Whilegetkeystate click lag Topic is solved

Ask gaming related questions (AHK v1.1 and older)
yuu453
Posts: 4
Joined: 24 Apr 2024, 05:52

Whilegetkeystate click lag

Post by yuu453 » 24 Apr 2024, 05:57

Code: Select all

$n::
IF NDown Send 6
{
While GetKeyState("n")
Click
Sleep 20
    }
IF NUp Send 1
even if I manage to make it work clicks making my mouse freeze :cry:

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

Re: Whilegetkeystate click lag  Topic is solved

Post by mikeyww » 24 Apr 2024, 06:17

Welcome to this AutoHotkey forum!

All AHK commands belong on their own lines. Don't make up your own syntax! A plain "word" is typically seen as a variable unless it is otherwise recognized by AHK. Looking at the documentation and examples of scripts may help you.

Perhaps:

Code: Select all

#Requires AutoHotkey v1.1.33.11

n::
Send 6
While GetKeyState("n", "P") {
 Click
 Sleep 20
}
Send 1
Return
If you are new to AHK, I recommend using its current version, which is v2, instead of this older deprecated version that is no longer developed.

Post Reply

Return to “Gaming Help (v1)”