Request: Simple AHK Script.
So I feel tired of spamming my mouse2 as a Tomb Raiser, anyone can make a simple script that when you press a key, it automatically presses mouse2 every 0.1s, and when you press again, it stops.
Something like this:
*Press X*
Mouse2()
Mouse2()
...
*Press X again*
Stop()
Sorry for my english

.
In autoit, just change whatever you need the mouse button(s) to be. As it is here, clicking the mouse wheel will toggle on/off spamming the left mouse button. You can easily change whatever key/button you're spamming as well as they toggle key. GL
HotKeySet("{END}", "ForceEnd")
DeclareGlobals()
Local $hDLL = DllOpen("user32.dll")
While 1
If _IsPressed("04", $hDLL) Then
ToggleSpamLClick()
EndIf
If $SpamLClick=1 Then
MouseClick("Left")
EndIf
Sleep(80)
WEnd
Func ToggleSpamLClick()
If $SpamLClick=0 Then
$SpamLClick=1
For $click=1 to 5
MouseClick("Left")
sleep(80)
Next
Else
$SpamLClick=0
Sleep(500)
EndIf
EndFunc
Func DeclareGlobals()
Global $SpamLClick=0
EndFunc
Func ForceEND()
Exit
EndFunc
Tyvm but when I run this script, it says there is an error on line 3.