Need help with a timed keypress

Ask gaming related questions
BoRap
Posts: 2
Joined: 18 May 2018, 13:15

Need help with a timed keypress

18 May 2018, 13:41

I want to use something like this toggle command that has multiple keypresses. what i need is for key 1 (which is a damage over time spell) to be pressed every, lets say, 8sec after the first go around. if anyone could help me out i`d greatly appreciate it.


$8::
SetKeyDelay,
SetTimer, PressKey, % (x := !x) ? "On" : "Off"
return



PressKey:
Send {1}
sleep 500
send {2}
sleep 500
send {3}
sleep 500
send {4}
sleep 500
Return
Louis Tully
Posts: 31
Joined: 25 Apr 2018, 03:03

Re: Need help with a timed keypress

18 May 2018, 15:28

Try this out. It's set to run from the 8 key and toggle from F2. F3 resets.


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

BoRap
Posts: 2
Joined: 18 May 2018, 13:15

Re: Need help with a timed keypress

18 May 2018, 16:50

thx. i tried it but its not firing off repeatedly enough even after lowering the sleep timer. i`ve been tinkering with a settimer script but im no script writer so i cant get it to function properly. heres the script. just need to get that Dot spell (key 3) to go off at start and then reapply every other 8sec. game i`m playing is wildstar

toggle := 0
return

8::
toggle := !toggle
if (toggle = 1)
SetTimer, Press1, 200
else
SetTimer, Press1, Off
if (toggle = 1)
SetTimer, Press2, 200
else
SetTimer, Press2, Off
if (toggle = 1)
SetTimer, Press3, 7000
else
SetTimer, Press3, Off
return

Press1:
SendInput, 1
return

Press2:
SendInput, 2
return

Press3:
SendInput, 3
return

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 12 guests