Autohotkey 在其重新映射中发送密钥组合不起作用AHK

Autohotkey 在其重新映射中发送密钥组合不起作用AHK,autohotkey,Autohotkey,我制作了一个AHK脚本,用AHK编译我的键盘布局,将其移动到Windows10启动文件夹,然后运行它。当我运行脚本并按下组合键时,它确实会运行,并且除了Ctrl+F7的初始发送之外,其他所有功能都会运行,它应该在我的编辑器中编译脚本。我试过一些方法,但到目前为止还没有奏效。谢谢你的帮助,我在下面附上了代码 #IfWinActive, ahk_class SciTEWindow ;if script editor is open $<^F7:: ;if ctrl+F7 is pres

我制作了一个AHK脚本,用AHK编译我的键盘布局,将其移动到Windows10启动文件夹,然后运行它。当我运行脚本并按下组合键时,它确实会运行,并且除了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
#IfWinActive,ahk#U类SciTEWindow;如果脚本编辑器处于打开状态
$而不是

Send {^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 has been changed)
    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
#IfWinActive,ahk#U类SciTEWindow;如果脚本编辑器处于打开状态

谢谢。成功了。
#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 has been changed)
    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