Do you have the Hot Key API?, You should if you are writing process memory.
Put this code in a timer with 1 intervals, Enabled
timer.enabled = false
if(getkeypress(vbkeyA)) then
''Do so on..
system.threading.thread.sleep(1000)''Removes the risk of Double pressing..
end if
timer.enabled = true