Label and Hotkey cmd not working as expected... Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
kunkel321
Posts: 1044
Joined: 30 Nov 2015, 21:19

Label and Hotkey cmd not working as expected...

22 Oct 2021, 14:13

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:
ste(phen|ve) kunkel
User avatar
kunkel321
Posts: 1044
Joined: 30 Nov 2015, 21:19

Re: Label and Hotkey cmd not working as expected...

22 Oct 2021, 15:04

Yes, it behaves as expected when Goto is used. Thanks!
ste(phen|ve) kunkel

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: drani and 229 guests