Skip to content

Instantly share code, notes, and snippets.

@hoppfrosch
Last active January 23, 2024 05:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hoppfrosch/bc1ada358b804a24750c to your computer and use it in GitHub Desktop.
Save hoppfrosch/bc1ada358b804a24750c to your computer and use it in GitHub Desktop.
Auto Clicker - auto-clicks when the left mouse button is held down. . #ahk #script #snippet
# Source http://slanter-ahk.blogspot.de/2009/02/ahk-new-auto-clicker.html
# This is a new 5-line autoclicker made possible with the release of AHK 1.0.48. Use Insert to toggle it on and off.
LButton::
While GetKeyState("LButton","P")
Send {LButton}
Return
Insert::Hotkey, LButton, Toggle
# Source: http://slanter-ahk.blogspot.de/2008/08/simple-auto-clicker.html
# Simply auto-clicks when the left mouse button is held down. Insert toggles the auto-clicker on and off
Insert::
Hotkey, LButton, Toggle
Hotkey, LButton Up, Toggle
Return
LButton::
Loop
{
If (Stop)
Break
Send {lbutton}
}
Stop := 0
Return
LButton Up::Stop := 1
@pwnedbytoxic
Copy link

I used tampermonkey and it said the script was invalid. (if I'm not doing it right just tell me cause I don't have any coding experience

you realize tampermonkey is for userscripts right????? you can't just run an ahk file in any text editor

@Alfian5032
Copy link

is there a way to increase the cps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment