From 8819fddff54d549fe56577c9ae92bd8a57d7beaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 26 Dec 2020 15:38:23 +0100 Subject: doubleclick, explorer: Simplify DoubleClick function Also invoke Edit2 action when Shift is held. --- tt.doubleclick.ahk | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'tt.doubleclick.ahk') 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 -- cgit v1.2.3