keywords: rapidclick auctoclick fast toggle fire shoot rapid key press repeatedly press keys mouse spam key spam toggle key press autofire autopress rapidfire cycle COD MW2 MWF2 MW CSS CS:S Cheat macro hack The definitive autofire thread by nimda
At the bottom of this post you will find two ready-to-go autoclickers/RapidClickers!
This is the one size fits all autofire thread. Here, you will find many different ways to spam keys, repeat actions, etc. It aims to keep the scripts very short (enough to fit in a non scrolling code box) but at the same time be very clear. After the title of most is a one-line explanation of how to use it.
Most scripts will click, type 'a', and wait 1/10 of a second during its loop. You can replace this with your own code in any of the spots. Most scripts will use the F8 hotkey. Important modifier symbols will be orange, and in places where more than one thing needs to be changed, (as in the Self-Sender) the parts that need to be changed will be dark red.
There are several types of loops that can be made:
The SetTimer: (Same as the simple pause, but allows other code to run)
SetTimer Click, 100
F8::Toggle := !Toggle
Click:
If (!Toggle)
Return
Click
Send a
return
The SetTimer (ternary version, by None, doesn't use resources when off):
i:=0 F7::SetTimer, Spam, % (i:=!i) ? "100" : "Off" ; uses ternary Spam: Click Send a return
If you find the ternary ( ? : ) operator difficult, check out the ternary guide by [VxE] or use the other SetTimer method.
The Toggle: (Press once to start, again to stop, etc like the simple pause)
Warning: If the hotkey used by the Toggle is input faster than the loop executes, the maximum number of simultaneous threads per hotkey can be exceeded, which leaves the execution "stuck" in a spamming state (reference Leef_me's explanation).
toggle = 0
#MaxThreadsPerHotkey 2
F8::
Toggle := !Toggle
While Toggle{
Click
Send a
sleep 100
}
return
The Self-Sender: (emulates auto-repeat) (hold down the key to do action)
$a::
While GetKeyState("a","p"){
Send a
Sleep 100
}
return
The Simple Pause: (Press F8 to toggle state i.e., once on, two off...)
Pause
Loop{
Click
Send a
sleep 100
}
F8::Pause
The Hold-Down: (key retains functionality unless held down)
$a::
KeyWait a, T0.5 ; Wait 1/2 second for user to release "a" key
If ErrorLevel ; Still held down
While GetKeyState("a","p"){ ; While it is held down
Click
Send a
Sleep 100
}
Else ; They let go in time
Send a
return
The Cycle (cycles through a list of keys to send)
list=a,b,c,{enter},string{click} ; the list of keys and combos. comma separated.
stringsplit, list, list,`,
Counter = 0
$F8:: ; press F8 to cycle through
Counter := (Counter=list0) ? (1) : (Counter+1)
send % list%counter%
returnIf you find the ternary ( ? : ) operator difficult, check out the ternary guide by [VxE] or tidbit's ternary-free post down the page.
The Cycle-Hold-Down: (Cycles through the list while F8 is held)
list=a,b,c,{enter},string{click} ; the list of keys and combos. comma separated.
stringsplit, list, list,`,
Counter = 0
$F8::
While GetKeyState("F8","P"){
Counter := (Counter=list0) ? (1) : (Counter+1)
Send % list%counter%
Sleep 50
}
return
And, by very popular request, two cut and paste (Voila! It works!) autoclickers: *
Hold Click to Rapid-Click:
~$LButton::
While GetKeyState("LButton", "P"){
Click
Sleep 50 ; milliseconds
}
return
Hold F8 to Rapid-Click:
F8::
While GetKeyState("F8", "P"){
Click
Sleep 50 ; milliseconds
}
return*The toggle works well for this purpose as well
To have any key exit the loop, see this example.
It doesn't work in my game!
http://www.autohotke...faqbot/faq.html
http://www.autohotke...s/FAQ.htm#games
Here are some helpful links to get you started customizing these:
#MaxThreadsPerHotkey
Send
Click
KeyWait
GetKeyState
Loop (normal)
SetTimer
Edited by nimda, 28 January 2013 - 07:35 PM.
Removed broken color from the code boxes.




