Interesting thing here... This bit of code is near the top of a script. When
varStayInRAM := "1", then it does behave as expected. It stops and waits for the hotkey press. However when
varStayInRAM := "0", it runs twice. It seems to jump down to the
DontWait: label as expected, but the
Hotkey line of code seems to also trigger, even though the hotkey has not been pressed.
Any ideas what I might be doing wrong?
Code: Select all
varStayInRAM := "0"
If (varStayInRAM != 1) ; If varStayInRAM =/= 1, then skip this and just run the tool.
GoSub, DontWait
;Hotkey, %varHotkey%, DontWait
Hotkey, !^+w, HotKeyPressed
DontWait:
HotKeyPressed: