Help with a short script

Ask gaming related questions (AHK v1.1 and older)
burnskull
Posts: 2
Joined: 03 Apr 2017, 10:03

Help with a short script

15 Dec 2017, 05:08

~LButton::
SendInput {a down}
Sleep 1
SendInput {a up}
return That's what i came up with. What i was trying to do is make it so that when i press LMB, it won't perform LMB but instead hold 'A' for a millisecond, release it, and only then perform LMB.
Sometimes it works, sometimes it doesn't...
Rohwedder
Posts: 7627
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help with a short script

15 Dec 2017, 10:01

Hallo,
Sleep, 1 is too short. See https://autohotkey.com/docs/commands/Sleep.htm
If you want first hold 'A' for some milliseconds and then perform LMB, try:

Code: Select all

$LButton::
	SendInput {a down}
	Sleep 50
	SendInput {a up}
	Send {LButton Down}
Return
~LButton Up::Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: ishida20, mikeyww and 76 guests