当我尝试编译我的自动热键(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
以防万一有人到达这里,错误:
Error: This line does not contain a recognized action.
当您尝试在 AHK v2 引擎中运行 AHK v1 代码时会发生。
请注意,因为它们的语法完全不同。