Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[module] Mouse gestures


  • Please log in to reply
6 replies to this topic
Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009

WARNING: This is old thread. It is continued here.
 
[module] Mouse gestures by Learning one
- no globals
- easy to use, understand, and implement in any script
- compatible with both AHK_L and AHK Basic

Download MouseGestures.ahk

Basic example (other examples are in MouseGestures.ahk)






MButton::MG_Recognize() ; recognizes performed mouse gesture and executes appropriate function

MG_R() { ; mouse gesture: Right
MsgBox,,, %A_ThisFunc%, 1 ; specify your action here
}
MG_RD() { ; mouse gesture: Right, Down
MsgBox,,, %A_ThisFunc%, 1 ; specify your action here
}
MG_RDL() { ; mouse gesture: Right, Down, Left
MsgBox,,, %A_ThisFunc%, 1 ; specify your action here
}
; etc.


Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Module updated. Changes:
- added MG_ prefix to all functions to avoid collision with other libs
- RecognizeGesture() renamed to MG_Recognize()
- even simpler usage;
- MGHotkey become optional parameter. Now all parameters are optional.
- you don't have to use #UseHook or $ prefix any more

Tuncay
  • Members
  • 1945 posts
  • Last active: Feb 08 2015 03:49 PM
  • Joined: 07 Nov 2006
Extremly nice. :lol: can`t wait to test it out on my vista machine. New food for my collection (and with license text <3).

No signature.


Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
[module] Mouse gestures updates:
- added FuncPrefix - possibility to specify custom prefix of function to execute. If empty, "MG_" prefix applies.
- license changed - it's very permissive now
- new examples
- first post updated

bj
  • Members
  • 5 posts
  • Last active: Jun 02 2011 09:49 PM
  • Joined: 16 Dec 2010
Great module. I like the enhanced flexibility over Radial Menu Mouse Gestures. Would it be difficult to replace the Radial Menu mouse gestures with this module?

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Thanks. What possibilities from this module would you like to have in Radial menu's mouse gestures? Maybe configurable MaxMoves in gesture?

bj
  • Members
  • 5 posts
  • Last active: Jun 02 2011 09:49 PM
  • Joined: 16 Dec 2010
Mouse Gestures in Radial Menu is easily my most used and favorite element.

I don't think I could pick a favorite option in this module. I like them all and can see using all of them.

I suppose I could delete all the functions in Radial Menu Mouse Gestures and use this module in its place.