官方的
#include <MouseSetOnEvent_UDF.au3>
;Disable Primary mouse button *down*, and call our function when mouse button *down* event is recieved
_MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "MousePrimaryDown_Event")
Sleep(5000)
_MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT) ;Enable mouse button back.
MsgBox(64, "Attention!", "Now we disable Secondary mouse button up, and call our function when mouse button up event is recieved.", 5)
;Disable Secondary mouse button *up*, and call our function when mouse button *up* event is recieved
_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT, "MouseSecondaryUp_Event")
Sleep(5000)
_MouseSetOnEvent($MOUSE_SECONDARYUP_EVENT) ;Enable mouse button back.
Func MousePrimaryDown_Event()
ConsoleWrite("Primary Mouse Down" & @LF)
EndFunc
Func MouseSecondaryUp_Event()
ConsoleWrite("Secondar Mouse Up" & @LF)
EndFunc
|