Ahk2Exe 此行不包含可识别的操作

问题描述 投票:0回答:1

当我尝试编译我的自动热键(ahk)代码时出现此错误。 Ahk2Exe 错误 错误:脚本包含语法错误。

具体来说: C:\Users\ibraheem\Downloads .ahk (1) : ==> 该行不包含可识别的操作。 具体来说:#SingleInstance,强制

代码:

#SingleInstance, force
#MaxThreadsPerHotkey 2
RCtrl:: 
    Toggle := !Toggle
    while Toggle
    {
        Send e
        Sleep, 300 ; 0.3 Seconds
    }
Return


F11::ExitApp  ; exit
key autohotkey auto
1个回答
0
投票

以防万一有人到达这里,错误:

Error: This line does not contain a recognized action.

当您尝试在 AHK v2 引擎中运行 AHK v1 代码时会发生。

请注意,因为它们的语法完全不同。

https://www.autohotkey.com/docs/v2/index.htm

© www.soinside.com 2019 - 2024. All rights reserved.