Skip to content

Instantly share code, notes, and snippets.

@anonymous1184
Last active February 26, 2024 04:29
Show Gist options
  • Save anonymous1184/486ea7286eaab309d05de26d841ee6ff to your computer and use it in GitHub Desktop.
Save anonymous1184/486ea7286eaab309d05de26d841ee6ff to your computer and use it in GitHub Desktop.
Auto-Clickers

Auto-Clickers

Toggle + Click & Hold (loop)

cps := 30

return ; End of auto-execute

F1::Hotkey LButton, Toggle

~LButton::
    wait := 1000 // cps
    while (GetKeyState("LButton", "P")) {
        Click
        Sleep % wait
    }
return

Toggle + Click & Hold (timer)

cps := 30
toggle := 0

return ; End of auto-execute

F1::toggle ^= 1

#If (toggle)
    LButton::SetTimer Clicker, % 1000 // cps
    LButton Up::SetTimer Clicker, Off
#If

Clicker() {
    Click
}

Click to toggle

cps := 30
toggle := 0

return ; End of auto-execute

~LButton::SetTimer Clicker, % (toggle ^= 1) ? 1000 // cps : "Delete"

Clicker() {
    Click
}

Double-Click to toggle

cps := 30
toggle := 0

return ; End of auto-execute

~LButton::
    if (A_PriorHotkey = A_ThisHotkey && A_TimeSincePriorHotkey < 200)
        SetTimer Clicker, % (toggle ^= 1) ? 1000 // cps : "Delete"
return

Clicker() {
    Click
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment