Because of my limited coding experience, I was only able to create a code that hit space bar and ONE direction only (either Right, Left, Up or Down by changing it in the code).
I am looking for an someone who can help me modify the code, so that when I press an arrow key while this loop is going on, it detects and change to the direction of my choice anytime I want while the loop is on going.
Thank you. Below is my code. Thank you.
Code: Select all
Delete::
if (HitToggle := !HitToggle)
SetTimer, Hit, -1
return
Hit:
While (HitToggle)
{
ControlSend, ahk_parent, {Space}, Warrior
ControlSend, ahk_parent, {Space}, Poet
sleep 350
ControlSend, ahk_parent, {Right}, Warrior
ControlSend, ahk_parent, {Right}, Poet
sleep 350
}
return
HitToggle := 0