关键字参考


#OnAutoItStartRegister

注册一个当AutoIt开始运行时调用的函数.

#OnAutoItStartRegister "函数"

参数

函数 要调用的用户函数.

注意/说明


相关

OnAutoItExitRegister

示例/演示


; Register Example1 and Example2 to be called when AutoIt starts.
#OnAutoItStartRegister "Example1"
#OnAutoItStartRegister "Example2"

Sleep(1000)

Func Example1()
    MsgBox(4096, "", '首先调用了 Example1() 函数')
EndFunc   ;==>Example1

Func Example2()
    MsgBox(4096, "", '然后调用了 Example2() 函数')
EndFunc   ;==>Example2