找回密码
 加入
搜索
查看: 3189|回复: 2

[AU3基础] 可以把热键定义到鼠标上吗?已解决

[复制链接]
发表于 2013-7-16 15:07:31 | 显示全部楼层 |阅读模式
本帖最后由 p7749 于 2013-10-6 15:14 编辑

可以把热键定义到鼠标上吗?我一直用鼠标操作,突然间要想暂停。或者启用别的功能。就要去按热键,这时觉得不如都设置到鼠标上流畅,所以有问。可以把热键定义到鼠标上吗?用什么方法请举例来说明一下好吗!
发表于 2013-7-17 15:25:54 | 显示全部楼层
举例就算了 全局事件的话hook鼠标  窗口鼠标事件的话消息捕捉
发表于 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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-17 15:57 , Processed in 0.066968 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表