在Autohotkey中,我希望按下按键以实现其原始目的,同时执行一些附加功能.
例如,在按下"^ a"时,我希望"^ a"正常运行(例如Select All),然后是send另一个"word".
我试着重复按下的键,即以下内容:
^a::
send, ^a
send, word
return
Run Code Online (Sandbox Code Playgroud)
但是,如果我再次发送触发键(^ a),该功能将变为"递归"并且永远不会结束.
Rob*_*ink 26
$~^a::
Run Code Online (Sandbox Code Playgroud)
〜代码执行时会传递^代码,所以你甚至不需要重复发送,^ a.
我是 Autohotkey 初学者,但我认为你使用“$”符号。
$^a::
send, ^a
send, word
return
Run Code Online (Sandbox Code Playgroud)
通常仅当脚本使用“发送”命令发送构成热键本身的按键时才需要这样做,否则可能会导致脚本自行触发。
热键(鼠标、操纵杆和键盘快捷键) > 简介和简单示例 > 您可以使用以下内容 > 这通常只是
http://www.autohotkey.com/docs/Hotkeys.htm