This almost entirely nicked from TheIrishThug, from his post in
www.autohotkey.com/forum/topic8357-15.html
His script gives you, on top of additional RButton double- and long clicks, a RButton & MButton combo.
I just replaced that single combo by 4 mini Gestures, one for any diagonal direction. I chose diags
because that is the simplest maths.
Mine does not work for the RButton or LButton, because it interferes with dragging.
It does work for the MButton, but in my opinion, it is best when used with the XButtons.
Code:
; Mainly nicked from
; TheIrishThug, in www.autohotkey.com/forum/topic8357-15.html
; from Tue Apr 25, 2006.
; miniGestures added by
; SoerenB, Apr 14, 2010
#Persistent
#singleinstance force
SetMouseDelay, 0
Ti = 4 ; Doesn't detect gesturing when moved VERY little
XButton1::
MouseGetPos,mGX1,mGY1 ; get coords to start with
keywait, XButton1, t0.2 ; to identify long Clicks
if errorlevel = 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
{
MouseGetPos,mGX2,mGY2 ; get second coords when Button is released
;
;'press-n-hold'
;
;;;;;;;;;;;;; If GESTURE, -> ACTION (replace MsgBoxLines with YOUR actions);;;;;;;;;;;
;
if(mGX2>mGX1+Ti and mGY2<mGY1-Ti)
{
msgBox, , ,XButton1 Act 1`nUPRIGHT!, 0.6
return
}
if(mGX2<mGX1-Ti and mGY2>mGY1+Ti)
{
msgBox, , ,XButton1 Act 2`nDOWNLLEFT!, 0.6
return
}
if(mGX2<mGX1-Ti and mGY2<mGY1-Ti)
{
msgBox, , ,XButton1 Act 3`nUPLEFT!, 0.6
return
} ;
if(mGX2>mGX1+Ti and mGY2>mGY1+Ti)
{
msgBox, , ,XButton1 Act 4`nDOWNRIGHT!, 0.6
}
else
msgBox, , ,XButton1 LONG`nUNMOVED, 0.6
return
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
else
keywait, XButton1, d, t0.24
if errorlevel = 0
{ ; 'double click'
;;;;;;; I think it is here that an additional GesturesBlock ;;;;;;
;; could go in for double-click MiniGestures. I'm quite sure
;; the timing would be more critical - can't memorize so many
;; actions, anyway, so I won't try to implement.
{
msgBox, , ,XButton1`nDOUBLE CLICK, 0.6
}
return
}
else ; regular single click
;
mouseclick, X1 ; does a "BrowserBack" with my mouse
return