作者: Learning one 最近更新时间: nonexistent
Mouse gestures are specific mouse movements which can be recognized by this module.
Gestures recognition system recognizes 4 basic mouse movements: up, down, right, left.
- completely in function form
- easy to use, understand, implement in your script
- documentation + all functions < 160 lines
- does not require additional function libraries
MG_GetAngle(StartX, StartY, EndX, EndY)
MG_GetMove(Angle)
MG_GetRadius(StartX, StartY, EndX, EndY)
MG_Recognize(MGHotkey="", ToolTip=0, MaxMoves=3, ExecuteMGFunction=1, SendIfNoDrag=1)
关于函数的参数和返回值, 请参阅其源码.
It does lacks an external documentation. Look for that at head of source.
关于此函数(集)的更新细节和注意事项, 请参见 AutoHotkey 论坛: http://www.autohotkey.com/forum/viewtopic.php?t=56472
此函数(集)是基于 free non commercial 许可的开源项目. 想了解许可详情, 请参见 Learningone_mg-license.txt
; #Include mg.ahk #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% MsgBox Hold right mouse button and make movements up to four different directions and release that button. If a gesture was recognized, it should show it code.`n`nThe middle mouse button calls predefined functions. ; Example 1: store gesture in variable and show it in MsgBox if it isn't blank or zero. RButton:: Gesture := MG_Recognize() if Gesture MsgBox,,, %Gesture%, 1 Return ; Example 2: execute existing MG function MButton::MG_Recognize() MG_R() { MsgBox,,, %A_ThisFunc%, 1 } MG_RD() { MsgBox,,, %A_ThisFunc%, 1 } MG_RDL() { MsgBox,,, %A_ThisFunc%, 1 }