Page 1 of 1

Hold two keys, repeat another

Posted: 22 Feb 2018, 21:09
by WhoDnee
So, I'm new to AHK, and I'm not sure how to go about multiple inputs doing various things.

What I'd like to do is upon hitting, say "0", hold "W" and "Shift", while pressing C once every .4 milliseconds or something.. If I hit "0" again, the script will shut off.

Re: Hold two keys, repeat another  Topic is solved

Posted: 23 Feb 2018, 01:44
by Nwb
I don't know if it will work I'm a newbie with this but I tried. :crazy:

Code: Select all

0:: 
toggle := !toggle
if toggle
Send, {W down} {Shift down} 
loop 
{ 
Send, c
Sleep 4
if not toggle
break
}
else 
Send, {W up} {Shift up}
return