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

Post by PipeDreams » 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: 17404
Joined: 21 Dec 2014, 02:44

Re: Loop, Parse, and Keywait

Post by boiler » 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.

User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Loop, Parse, and Keywait  Topic is solved

Post by Xtra » 15 Apr 2021, 13:17

Code: Select all

KeyWait, % A_LoopField


Post Reply

Return to “Ask for Help (v1)”