在 Autohotkey 中,如果 Foxit Reader 处于事件状态,我如何使 NumpadDot 双击,否则发送一个正常的 NumpadDot?
我的(失败的)尝试:
NumpadDot::
SetTitleMatchMode 2 ; allow partial titles
IfWinActive, Foxit
Click 2
else
Send {NumpadDot} ; THIS CREATES AN ENDLESS LOOP!
Return
最佳答案
我推荐@RobertIlbrink 的回答,但这是另一种方法。
$NumpadDot::
IfWinActive, Foxit
Click 2
else
SendInput {NumpadDot}
return
$
防止 AutoHotkey 将发送的按键(通过发送命令)与用户的按键混淆。如果我们不这样做,我们将陷入无限循环。
关于Autohotkey - 如果不满足条件则发送默认行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15840608/