Autoit 3 Generic Keypress

我与影子孤独终老i 提交于 2019-12-13 15:50:57

问题


It seems like there should be a generic keypress listener, something like this:

hotkeysset("listener")

func listener(key)
    msgbox(0, "Key", "You pressed " & key)
endfunc

while true
    sleep(100)
wend

But short of writing a script that generates the appropriate hotkeyset calls for each key on my keyboard, I can't figure out how to do that. Any thoughts?


回答1:


Check out this UDF (User-Defined Function), IsPressed_UDF.



来源:https://stackoverflow.com/questions/5642324/autoit-3-generic-keypress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!