Left mouse button down = start timer, after 2 seconds auto left mouse button up? Topic is solved

Ask gaming related questions
MantraHK
Posts: 6
Joined: 09 Mar 2024, 00:48

Left mouse button down = start timer, after 2 seconds auto left mouse button up?

09 Mar 2024, 01:59

Hoping someone here can help me. I cant work out how to create a script whereby, while I am playing a game if for any reason I keep the left Left mouse button down for more than 2 seconds automatically engage left mouse button up?
TIA


[Mod action: Moved topic to the “Gaming” section.]
User avatar
mikeyww
Posts: 27214
Joined: 09 Sep 2014, 18:38

Re: Left mouse button down = start timer, after 2 seconds auto left mouse button up?  Topic is solved

09 Mar 2024, 15:16

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0
~LButton:: {
 If !KeyWait('LButton', 'T2')
  Click('U'), SoundBeep(1500)
}
MantraHK
Posts: 6
Joined: 09 Mar 2024, 00:48

Re: Left mouse button down = start timer, after 2 seconds auto left mouse button up?

09 Mar 2024, 16:44

mikeyww wrote:
09 Mar 2024, 15:16
Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0
~LButton:: {
 If !KeyWait('LButton', 'T2')
  Click('U'), SoundBeep(1500)
}
That was fast. Thank you for your help. It works like a charm.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 4 guests