I am looking for a way to modify the code slightly, so that it detects the arrow key I press while in the loop, and implement that arrow key I just pressed inside the loop without affecting {Space}.
So when is going on and I press {Left}, the loops changes to {Space} + {Left},
when I press {Right}, the loops goes to {Space} + {Right}
when I press {Up}, the loop goes to {Space} + {Up}
when I press {Down}, the loop goes to {Space} + {Down}
Thank you.
Code: Select all
Delete::
if (HitToggle := !HitToggle)
SetTimer, Hit, -1
return
Hit:
While (HitToggle)
{
ControlSend, ahk_parent, {Space}, John
sleep 350
ControlSend, ahk_parent, {Right}, John
sleep 350
}
return
HitToggle := 0