I have the following script
Code: Select all
#If WinActive("ahk_exe notepad.exe")
g::
+g::
Send, é
Sleep, 400
Send, q
Sleep, 500
Send, í
return
#If
If I press the ENTER key, and then I press the G, nothing should happen untill I press either the ENTER again or ESC.
So to make it more simple, here is how it should work:
Press G - script executes
Press Enter - Press G - Nothing happens
Press Enter - Press G - Nothing happens, Press G again - Nothing happens
Press Enter - Press G - Nothing happens - Press Enter - Press G - Script executes
Press Enter - Press G - Nothing happens - Press Escape - Press G - Script executes
Basically, pressing the Enter key turns the G hotkey "off" until the ENTER is pressed again (or ESCAPE) and it urns the G hotkey back "on"
In case you are curious why I need it to work like that, it's for a game, I don't want the hotkey to do anything when I'm typing inside of the game chat (which is activated by an enter key, and then the typed message is sent by pressing the enter again, or pressing the esc to close the chat).
thank you!