假设我有一个自动热键脚本C:\path\to\my\script
跑步。有没有办法定义一个重新启动的热键?
In order to prevent duplicate instances, I normally do not re-launch a script but use the build-in function Reload https://autohotkey.com/docs/commands/Reload.htm. I launch this with Ctrl+Win+Alt+R and use Ctrl+Win+Alt+E to edit the main AHK script.
^#!r::Reload
实际上,我的脚本如下所示:
^#!r::
Send, ^s ; To save a changed script
Sleep, 300 ; give it time to save the script
Reload
Return
^!#e::Edit
事实上,在我的脚本的顶部,我有这样的视觉和音频指示,表明脚本已重新启动:
#SingleInstance Force
#installKeybdHook
#Persistent
Menu, Tray, Icon , Shell32.dll, 25, 1
TrayTip, AutoHotKey, Started, 1
SoundBeep, 300, 150
Return
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)