clicker help

Ask gaming related questions (AHK v1.1 and older)
exvirus2
Posts: 5
Joined: 04 Apr 2022, 06:24

clicker help

Post by exvirus2 » 30 Dec 2022, 07:16

Code: Select all

pause on

loop
{
click
sleep 0,01
}

XButton2::pause
[Mod edit: [code][/code] tags added.]
--------------------------------------------
auto clicker If a w or other button is pressed, xbutton2 will not work. How can I make xbutton2 be pressed at any time? Priority mode let's say

off
Posts: 176
Joined: 18 Nov 2022, 21:54

Re: clicker help

Post by off » 25 Jan 2023, 22:36

You need to use SetTimer instead loop
(untested)

Code: Select all

Pause on
SetTimer, clicker, -1

clicker:
Click
Sleep, 1 ; this value already in milisecond.
return

XButton2::Pause

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: clicker help

Post by DuckingQuack » 28 Jan 2023, 22:18

@off
I totally agree with the change to a timer, but the period should be a positive number if this is intended to continuously run. Also, I feel the sleep within the clicker function is unnecessary as the interval is easily controlled by the timer.
Best of Luck,
The Duck

off
Posts: 176
Joined: 18 Nov 2022, 21:54

Re: clicker help

Post by off » 30 Jan 2023, 21:15

DuckingQuack wrote:
28 Jan 2023, 22:18
Also, I feel the sleep within the clicker function is unnecessary
Oh yes i forgot to remove, i added SetTimer after i copy pasted his code
And i meant to just tell him the Sleep time is already in ms not in second.

Post Reply

Return to “Gaming Help (v1)”