Hey!
How can I do something like:
- If single click: do A
- If double click: do B and don't do A
I guess the script has to wait the time before deciding if it's double or single, but I can't figure out how to stop it there and then do the detection later.
Thanks!
Distinguish between single and double click
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Distinguish between single and double click
I'm guessing you'd need to determine the double click speed setting somehow.
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Distinguish between single and double press
It wasn't really what I indented, sorry for the confusion.
Currently, I use the following in order to detect a double key press:
The problem with this, is that the script won't "wait" for the double press to happen or not happen, it would just go on forward and execute both the double click if and what comes after.
What I'm looking for is a way to separate the two.
Currently, I use the following in order to detect a double key press:
Code: Select all
If (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200)
What I'm looking for is a way to separate the two.
Code: Select all
If (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200)
ToolTip, Double click ; wait to see if it's indeed a double click or not
Else
ToolTip, Single Click ; don't go here in case of double click
Re: Distinguish between single and double click
You should show the actual script because that’s where the issue probably lies. If your hotkey is defined as ~LButton::, then it’s not going to wait to see if a double-click happens before executing the click.
Who is online
Users browsing this forum: Bing [Bot], bobstoner289, Chunjee, macromint, peter_ahk and 330 guests