Loop, Parse, and Keywait Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
PipeDreams
Posts: 165
Joined: 19 Dec 2015, 00:20

Loop, Parse, and Keywait

15 Apr 2021, 13:13

KeyWait only works with one key at a time in my Var, when I add others it, it no longer works. Why? What am I doing wrong here?
I have used this same Loop, Parse, thing with colors and PixelSearch with out issues. I don't see the issue.

Code: Select all

Loop,
{	;MyHotkey :="Shift"			;Working
	MyHotkey :="w|a|s|d|Shift"	;Not Working
	Loop, Parse, MyHotkey, |
	{	KeyWait, % MyHotkey
		SoundBeep, 600, 10
	} Sleep, 400
} Return
User avatar
boiler
Posts: 16985
Joined: 21 Dec 2014, 02:44

Re: Loop, Parse, and Keywait

15 Apr 2021, 13:16

The parsed item inside the loop is A_LoopField, not MyHotkey. MyHotkey is always w|a|s|d|Shift.
Last edited by boiler on 15 Apr 2021, 13:17, edited 1 time in total.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 87 guests