Need a little help please

Ask gaming related questions
HerrTrigger
Posts: 1
Joined: 13 Jul 2018, 19:37

Need a little help please

13 Jul 2018, 19:42

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
Qysh
Posts: 143
Joined: 24 Apr 2018, 09:16

Re: Need a little help please

14 Jul 2018, 11:36

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
or

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

Return to “Gaming”

Who is online

Users browsing this forum: PipeDreams, robertlewandowskii and 23 guests