如何让用户在 autohotkey 中按下 gui 中的键?

问题描述 投票:0回答:1

我怎样才能得到用户按下的键?我正在尝试使用添加热键 gui,但它不适用于空格,但在我的脚本中我需要允许用户添加任何键

我尝试使用 gui add,热键但是,当我点击空格时没有用

autohotkey
1个回答
0
投票

你可以使用

#IfWinActive [WinTitle]

#Persistent
return

#IfWinActive <WinTitle>

Space::
MsgBox, You pressed space!
return

#IfWinActive

参考:https://www.autohotkey.com/docs/v1/lib/_IfWinActive.htm

© www.soinside.com 2019 - 2024. All rights reserved.