Trying to write a script to hold down “w” and “LShift” while also repeatedly pressing “c” in a game.
Got this so far but it doesn’t work
toggle := 0
0::
toggle := !toggle
if (toggle) {
SetTimer, Timer_Spam, 10
} else {
SetTimer, Timer_Spam, Off
}
return
Timer_Spam:
Send {c}
Sleep 800
Send {w, Down}
Send {LShift, Down}
return
Need a little help please
-
- Posts: 1
- Joined: 13 Jul 2018, 19:37
Re: Need a little help please
Code: Select all
*0:: ; Before: 0::
toggle := !toggle
if (toggle) {
SetTimer, Timer_Spam, 10
} else {
SetTimer, Timer_Spam, Off
Send {w Up} ; Release the Key
Send {LShift Up} ; Release the Key
}
return
Timer_Spam:
Send {c}
Sleep 800
Send {w Down} ; Before: Send {w, Down}
Send {LShift Down} ; Before: Send {LShift, Down}
return
Code: Select all
*0:: ; Before: 0::
toggle := !toggle
if (toggle) {
SetTimer, Timer_Spam, 10
} else {
Gosub, sendDown
SetTimer, Timer_Spam, Off
Send {w Up} ; Release the Key
Send {LShift Up} ; Release the Key
}
return
sendDown:
Send {w Down} ; Before: Send {w, Down}
Send {LShift Down} ; Before: Send {LShift, Down}
return
Timer_Spam:
Send {c}
Sleep 800
return
Who is online
Users browsing this forum: No registered users and 55 guests