一、 改进 仅在HX中才触发 二、上代码 #IfWinActive ahk_exe HBuilderX.exe :*:clog::console.log("{%}"); #IfWinActive 三、解释 #IfWinActive ahk_exe HBuilderX.exe表示在哪个应用程序下才能使用,ahk_exe表示在那个进程下才能使用 参考 热字串 - 定义与使用 | AutoHotkeyWinTitle 与上次找到的窗口 | AutoHotkey