help with script pls

Ask gaming related questions (AHK v1.1 and older)
mdrake1
Posts: 29
Joined: 18 Oct 2020, 07:15

help with script pls

Post by mdrake1 » 28 Oct 2021, 16:08

This is the script i want to modify:

Code: Select all

LButton::
KeyWait, %A_ThisHotkey%, T.3
If ErrorLevel ; Held
 While GetKeyState(A_ThisHotkey, "P") {
  Send 1
  Sleep, 15
 }
Else Click
Return
[Mod edit: [code][/code] tags added.]

Basically what i want is when i hit left mouse button i want it to hit number 2, and then i want it to upon holding left mouse button to hit 1 after the .3 delay. So i want the hold part of the macro to remain the same, i just want the beginning click to hit 2 instead if it hitting the normal left click action. I know that i will lose the normal functionality of left click.
User avatar
mikeyww
Posts: 27140
Joined: 09 Sep 2014, 18:38

Re: help with script pls

Post by mikeyww » 28 Oct 2021, 18:38

You can change the click to Send 2.
Post Reply

Return to “Gaming Help (v1)”