Hello! Been using AHK for awhile now, and i'm not so much of a writer as I am a copier. Nonetheless, I enjoy the program a lot, but i'm having trouble with a script i'm trying to use. It's meant to hold down Shift + W upon a button press, until the same button is pressed again, to create the action of sprint moving.
The code is here:
toggle = 0
#MaxThreadsPerHotkey 2;
Numpad5::
Toggle := !Toggle
While Toggle{
Send {W Down}
Send {Shift Down}
}
return
My problem is that once the macro is toggled on, it won't toggle off unless the script is forcibly shut down. Can anyone help me fix this problem?
Toggle for Shift + W won't toggle off
Re: Toggle for Shift + W won't toggle off
Hallo,
try:
try:
Code: Select all
toggle = 0
NumpadClear:: ;NumpadClear = Shift + Numpad5
Numpad5::
Toggle := !Toggle
While Toggle{
Send {Shift Down}
Send {w Down}
Sleep, 50
}
Send {Shift up}
Send {w up}
return
Who is online
Users browsing this forum: jameswrightesq and 145 guests