p7749 发表于 2013-7-16 15:07:31

可以把热键定义到鼠标上吗?已解决

本帖最后由 p7749 于 2013-10-6 15:14 编辑

可以把热键定义到鼠标上吗?我一直用鼠标操作,突然间要想暂停。或者启用别的功能。就要去按热键,这时觉得不如都设置到鼠标上流畅,所以有问。可以把热键定义到鼠标上吗?用什么方法请举例来说明一下好吗!

komaau3 发表于 2013-7-17 15:25:54

举例就算了 全局事件的话hook鼠标窗口鼠标事件的话消息捕捉

xjdjpbp 发表于 2013-7-17 18:48:25

能把鼠标滚轮作为热键吗
#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
页: [1]
查看完整版本: 可以把热键定义到鼠标上吗?已解决