Registers a function to be called when AutoIt exits.
OnAutoItExitRegister ( "function" )
| function | The name of the user function to call. |
| Success: | Returns 1. @extended can be set if already registered. |
| Failure: | Returns 0. |
| 0 | Natural closing. |
| 1 | close by Exit function. |
| 2 | close by clicking on exit of the systray. |
| 3 | close by user logoff. |
| 4 | close by Windows shutdown. |
OnAutoItExitRegister("MyTestFunc")
OnAutoItExitRegister("MyTestFunc2")
Sleep(1000)
Func MyTestFunc()
MsgBox(64, "Exit Results 1", 'Exit Message from MyTestFunc()')
EndFunc ;==>MyTestFunc
Func MyTestFunc2()
MsgBox(64, "Exit Results 2", 'Exit Message from MyTestFunc()')
EndFunc ;==>MyTestFunc2