diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-26 15:38:23 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-26 15:38:23 +0100 |
commit | 8819fddff54d549fe56577c9ae92bd8a57d7beaa (patch) | |
tree | 0c0a2188acaed33e3b180ca4d2c50bea58e58c62 /tt.doubleclick.ahk | |
parent | cb5563276258bb78741461e5f24bd24125576256 (diff) | |
download | ahk-8819fddff54d549fe56577c9ae92bd8a57d7beaa.tar.gz |
doubleclick, explorer: Simplify DoubleClick function
Also invoke Edit2 action when Shift is held.
Diffstat (limited to 'tt.doubleclick.ahk')
-rw-r--r-- | tt.doubleclick.ahk | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/tt.doubleclick.ahk b/tt.doubleclick.ahk index 58d83f4..bb84977 100644 --- a/tt.doubleclick.ahk +++ b/tt.doubleclick.ahk @@ -1,9 +1,7 @@ ;; DoubleClick function ;; ============================================================================ -;; DoubleClick returns true if a double click has been performed. The first -;; click in the double click is allowed to pass through, but the second click -;; is prevented. +;; DoubleClick returns true if a double click has been performed. ;; To use the function, call it whenever the user clicks. The function returns ;; true if two calls in a row meet the requirements for a double click. @@ -11,9 +9,7 @@ ;; Function definition -> library ;; ---------------------------------------------------------------------------- -;; The 'alternate' argument, if set to true, signifies a right click: - -DoubleClick(alternate := false) +DoubleClick() { ;; A bunch of global variables are needed to determine whether a double click @@ -55,10 +51,6 @@ DoubleClickClicked := false if (not DoubleClickClicked) { - if (alternate) - SendInput, {Click, right} - else - SendInput, {Click} DoubleClickPriorX := x DoubleClickPriorY := y DoubleClickLast := A_TickCount @@ -75,10 +67,6 @@ DoubleClickClicked := false || abs(x - DoubleClickPriorX) > SM_CXDOUBLECLK || abs(y - DoubleClickPriorY) > SM_CYDOUBLECLK) { - if (alternate) - SendInput, {Click, right} - else - SendInput, {Click} DoubleClickPriorX := x DoubleClickPriorY := y DoubleClickLast := A_TickCount |