基 础 函 数 参 考


OnAutoItExitRegister

注册 AutoIt 退出时调用的函数.

OnAutoItExitRegister( "函数" )

参 数

函数 注册的用户自定义函数名称.

返 回 值

成功: 返回 1. 如果已注册, 可以设置 @extended.
失败: 返回 0.

备 注

退出代码可以由 @ExitCode 检索.
退出模式可以由 @ExitMethod 检索.
0 正常关闭.
1 由退出函数关闭.
2 由点击系统托盘关闭.
3 由用户注销关闭.
4 由 Windows 关机关闭.

相 关 函 数

OnAutoItExitUnRegister, Exit, OnAutoItStartRegister

函 数 示 例


OnAutoItExitRegister("MyTestFunc")
OnAutoItExitRegister("MyTestFunc2")

Sleep(1000)

Func MyTestFunc()
    MsgBox(64, "退出结果 1", '由退出函数 MyTestFunc()关闭')
EndFunc

Func MyTestFunc2()
    MsgBox(64, "退出结果 2", '由退出函数 MyTestFunc2()关闭')
EndFunc   ;==>MyTestFunc2

provider with jb51.net (unicode)