注册一个当AutoIt退出时执行的函数.
OnAutoItExitRegister( "函数" )
函数 | 要调用的用户自定义函数名称 |
成功: | 返回 1. @extended 返回是否已被注册. |
失败: | 返回 0. |
0 | 正常关闭. |
1 | 由 Exit 函数关闭. |
2 | 点击系统托盘的退出而关闭. |
3 | 由用户注销系统关闭. |
4 | Windows 关机. |
OnAutoItExitRegister("MyTestFunc")
OnAutoItExitRegister("MyTestFunc2")
Sleep(1000)
Func MyTestFunc()
MsgBox(4160, "Exit Results 1", 'Exit Message from MyTestFunc()')
EndFunc ;==>MyTestFunc
Func MyTestFunc2()
MsgBox(4160, "Exit Results 2", 'Exit Message from MyTestFunc()')
EndFunc ;==>MyTestFunc2