Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v2) • Re: simple double click detect

$
0
0

It would be nice if there was some sort of AHK version filter portal were users can flag links with a version number.

It is filtered. The v1 section of the forum is totally separate from the v2 section. Just note which section of the forum in which the code appears. When you perform forum searches, you can identify exactly which sub-forum(s) from which to select if you want to restrict it.



i get a missing operand error

The "not equal to" operator is only != in v2. The <> operator from v1 doesn't exist in v2.



all I'm trying to do is detect a right mouse click and distinguish if its a double click or not. the documentation says there are no more commands. (send RButton) looks like a command.
is it send "RButton" or send (RButton) or Send ("RButton") or Send ({RButton"}) or Send {RButton} ?

Literal strings must always be quoted in v2 as expressions are used throughout, so it would be Send '{RButton}'.


This fixes those and other issues:

CODE:

#Requires AutoHotkey v2.0

RButton::{
if (A_PriorHotkey = 'RButton') and (A_TimeSincePriorHotkey < 400)
MouseClick 'Right' ; or Send '{RButton}'
}



All of this is actually more straightforward in v2 than it was in v1 because v1 had a mix of command and expression syntax. With v2, you know that you always apply expression syntax because command syntax doesn't exist.

Statistics: Posted by boiler — Today, 15:51



Viewing all articles
Browse latest Browse all 579

Trending Articles