为什么在 SetTimer 之后命令不是 运行?

Why does command not run after SetTimer?

此代码显示消息框:

Msgbox, Hello

SetTimer, CheckTime, 1000 ; updates every 1 second
CheckTime:
Return

但事实并非如此:

SetTimer, CheckTime, 1000 ; updates every 1 second
CheckTime:
Return

Msgbox, Hello

这是为什么?我没有看到 SetTimer 命令有什么特别之处。

只要找到第一个 Return 关键字,脚本就会停止执行新行。

第一个顶层 Return 之后的所有内容都将在初始执行时被忽略,除非它是从上面的行调用的。

看这段代码:

MsgBox, I'll run!!!

MsgBox, Me 2!!!

Gosub, PastReturn

overPastReturn()

MsgBox, Me 5!!!

Return ; This is the first Top Level Return. Code Stops Executing Here.

MsgBox, Not Me!!!

PastReturn:
    MsgBox, Me 3!!!
Return ; This Return Belongs to PastReturn Label.

MsgBox, Not Me 2!!!

overPastReturn(){
    MsgBox, Me 4!!!
}