Help with code

Ask gaming related questions (AHK v1.1 and older)
_zakazama_
Posts: 2
Joined: 24 May 2022, 11:44

Help with code

Post by _zakazama_ » 24 May 2022, 11:46

I need help
it is necessary that the code runs on the u button
and the code itself presses the left mouse button 30 times every second

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

Re: Help with code

Post by mikeyww » 24 May 2022, 20:20

Code: Select all

cps = 30
u::
SetMouseDelay, 0
start := A_TickCount, cliks := 0
While GetKeyState("u", "P") {
 Click
 Sleep, start - A_TickCount + 1000 * ++cliks / cps
 ToolTip, % "CPS = " Round(1000 * cliks / (A_TickCount - start))
}
Return

_zakazama_
Posts: 2
Joined: 24 May 2022, 11:44

Re: Help with code

Post by _zakazama_ » 25 May 2022, 03:35

if i need more time before each click, what i need to increase

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

Re: Help with code

Post by mikeyww » 25 May 2022, 04:59

To change clicks per second, you can alter the first line (cps).

Post Reply

Return to “Gaming Help (v1)”