Messed up toggle.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Dankukus
Posts: 11
Joined: 23 Feb 2018, 21:52

Messed up toggle.

16 Jun 2018, 20:07

I found two autoclickers. One only clicks about 30 times a second, but has a toggle, the other one clicks at 700 times per second, but it uses counts. I attempted mashing them together and created this. At first it seemed to work, but pressing shift f8 again would not turn it off. Any help?

Code: Select all

/#MaxThreadsPerHotkey 3
#NoEnv
#SingleInstance, Force

SetBatchLines, 11
SetMouseDelay, 0

+f8::
Toggle := !Toggle
Loop
{
	
	If (!Toggle)
		Break
    t_i := A_TickCount
    Loop, {
        Click
    }
}
return
I might just be dumb and messed up something lol.
Dankukus
Posts: 11
Joined: 23 Feb 2018, 21:52

Re: Messed up toggle.

16 Jun 2018, 20:10

Ackh the / was not supposed to be there.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Messed up toggle.

17 Jun 2018, 08:05

Try this:

Code: Select all

#MaxThreadsPerHotkey, 2

+f8::
    Toggle := !Toggle
    While Toggle
        Click
return
I hope that helps.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Messed up toggle.

17 Jun 2018, 08:20

Faster:

Code: Select all

#MaxThreadsPerHotkey, 2

+f8:: ; scores ~50 clicks/second on my PC as opposed to ~15 clicks/second above
    Toggle := !Toggle
    While Toggle
    {
        DllCall("mouse_event", "UInt", 2) ; MOUSEEVENTF_LEFTDOWN
        DllCall("mouse_event", "UInt", 4) ; MOUSEEVENTF_LEFTUP
    }
return
Dankukus
Posts: 11
Joined: 23 Feb 2018, 21:52

Re: Messed up toggle.

17 Jun 2018, 13:20

Ouch. Something there broke. Normally it clicked at 750 CPS. Anyways, this is what I based it off.

Code: Select all

#NoEnv
#SingleInstance, Force

SetBatchLines, 11
SetMouseDelay, 0

count = 700
return

F2::
    t_i := A_TickCount
    Loop, %count% {
        Click
    }
    MsgBox, % (A_TickCount - t_i) / 1000 ; elapsed time in s
return
Then I mixed it with another autoclicker extremely similar to wolf_II's.
Dunno. Yesterday, it had 750 CPS
Something dumbed up today.
Anyways, I attempted merging the top one and used the

Code: Select all

    Toggle := !Toggle
    While Toggle
    {
    ---
    }
Idk anymore
The working one clicks extremely fast, but only clicks 700 times. Any way to make that into a toggle?
Dankukus
Posts: 11
Joined: 23 Feb 2018, 21:52

Re: Messed up toggle.

17 Jun 2018, 13:22

Ack. Now the top one is also just slow. Thanks for the scripts thou. They work great! :D
Yesterday, the mashup and the top one clicked extremely fast.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Google [Bot], Spawnova and 327 guests