simple Auto Left mouse click

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dannyq2
Posts: 2
Joined: 05 Jul 2022, 14:35

simple Auto Left mouse click

Post by dannyq2 » 05 Jul 2022, 14:41

I have this Left mouse click script which I cannot get to stop, it works fine, but I am not getting the toggle to turn it off correct. I want to be able to hit F8 to turn the script on and off.

What needs to be done to the script listed below. Thanks in advance.

Code: Select all

F8::
    pause

    suspend

    


Toggle := !Toggle
loop
{

    If (!Toggle)
    
          Break

     Click
     Sleep 80 ;
}

return
[Mod edit: [code][/code] tags added.]

User avatar
mikeyww
Posts: 26880
Joined: 09 Sep 2014, 18:38

Re: simple Auto Left mouse click

Post by mikeyww » 05 Jul 2022, 14:51

Welcome to this AutoHotkey forum! One example is below.

Code: Select all

Pause
Loop {
 Click
 Sleep, 80
}
F8::Pause

dannyq2
Posts: 2
Joined: 05 Jul 2022, 14:35

Re: simple Auto Left mouse click

Post by dannyq2 » 05 Jul 2022, 15:20

Thanks for the quick reply and cleaning it up.

Post Reply

Return to “Ask for Help (v1)”