[英]Noticeable lag in hotkey, how can i reduce the delay?
I am trying to change the hotkey Win + E to Win + Space and i used the code below 我正在尝试将热键Win + E更改为Win + Space,我使用了下面的代码
Code: 码:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey
releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and
reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#space:: Run explorer.exe shell:MyComputerFolder
which worked fine but i noticed a lag. 工作正常,但我注意到了一个滞后。 when i use Win + E its opens instantly but when i use Win + Space there is a 1 sec delay.
当我使用Win + E时,它会立即打开,但是当我使用Win + Space时,会延迟1秒。
Is there anyway to get rid of this delay? 无论如何,有没有摆脱这种延迟?
Found a solution on AutoHotKey forums. 在AutoHotKey论坛上找到了解决方案。 If anyone is interested here it is
如果有人对这里感兴趣
Answered by username: TheDewd 用户名回答: TheDewd
#NoEnv ;
#NoEnv; Recommended for performance and compatibility with future AutoHotkey releases.
为提高性能并与将来的AutoHotkey版本兼容而推荐。
;
; #Warn ;
#Warn; Enable warnings to assist with detecting common errors.
启用警告以帮助检测常见错误。
SendMode Input ;
SendMode输入; Recommended for new scripts due to its superior speed and reliability.
由于其卓越的速度和可靠性,因此推荐用于新脚本。
SetWorkingDir %A_ScriptDir% ;
SetWorkingDir%A_ScriptDir%; Ensures a consistent starting directory.
确保起始目录一致。
#space::#e ;this line solves the delay.
#space ::#e;此行解决了延迟问题。 Makes it Just like using Win + E
就像使用Win + E一样
#e:: ;if you want to remap Win + E
#e ::;如果要重新映射Win + E
MsgBox, Test
MsgBox,测试
return
返回
Reference , just incase but all the answer is in the code above. 参考 ,以防万一,但是所有的答案都在上面的代码中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.