【发布时间】:2021-04-12 13:30:10
【问题描述】:
我制作了一个 AHK 脚本,它在 AHK 中编译我的键盘布局,将其移动到 Windows 10 启动文件夹,然后运行它。当我运行脚本并按下它确实运行的组合键时,除了最初发送的 Ctrl + F7 之外,所有功能都正常运行,它应该在我的编辑器中编译脚本。我已经尝试了一些东西,但到目前为止还没有奏效。感谢您的帮助,我附上了下面的代码。
#IfWinActive, ahk_class SciTEWindow ;if script editor is open
$<^F7:: ;if ctrl+F7 is pressed
Sleep, 200 ;wait a 0.2 seconds
Send {^F7} ;send ctrl+F7 to compile script (this line isn't working)
Sleep, 2000 ;wait 2 seconds for the script to compile
FileCopy, C:\Users\jackn\Typing\Key Mappings\Startup Folder Layouts\keymap.exe, C:\Users\jackn\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup, 1 ;Copies the file to the startup folder
Sleep, 100;waits 0.1 seconds
run, C:\Users\jackn\Typing\Key Mappings\Startup Folder Layouts\keymap.exe ;runs the program
return
return
【问题讨论】:
标签: autohotkey