| View previous topic :: View next topic |
| Author |
Message |
Fr0sTbY7eX Guest
|
Posted: Wed Sep 16, 2009 6:36 am Post subject: Air Strafing script |
|
|
| I am clueless at the moment. I have spent a good hour trying to do this on my own until I came here :/ I was wondering if I could get a script that just loops leftarrow and rightarrow like so it would go > < > <> < but with a break time I could edit the gaps between each change of direction? If possible bind it to the Left ALT button. Sorry to ask for an entire script. |
|
| Back to top |
|
 |
dwinar
Joined: 05 Sep 2009 Posts: 10
|
Posted: Wed Sep 16, 2009 9:22 am Post subject: |
|
|
This is what can be found in the AHK Help file but adjusted to your needs. If you have any question, just ask. Have fun.
| Code: |
#MaxThreadsPerHotkey 3
LAlt:: ; Left Alt hotkey (change this hotkey to suit your preferences).
#MaxThreadsPerHotkey 1
if KeepLoopRunning ; This means an underlying thread is already running the loop below.
{
KeepLoopRunning := false ; Signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change made by the line above.
}
; Otherwise:
KeepLoopRunning := true
Loop
{
; The next lines are the action you want to repeat (update them to suit your preferences):
Send {Right}
Sleep 1500 ; Gives you time for your editting the gaps, 1000 = 1 second (change to whatever you want)
Send {Left}
Sleep 1500
; But leave the rest below unchanged.
if not KeepLoopRunning ; The user signaled the loop to stop by pressing Win-Z again.
break ; Break out of this loop.
}
KeepLoopRunning := false ; Reset in preparation for the next press of this hotkey.
return
|
|
|
| Back to top |
|
 |
Fr0sTbY7eX Guest
|
Posted: Wed Sep 16, 2009 3:39 pm Post subject: |
|
|
Thanks man  |
|
| Back to top |
|
 |
|