tempman Posted March 16, 2011 Posted March 16, 2011 Hi, OnAutoItExit() is called when script is closing by windows or when windows is shutingdown... Since OnAutoItExit() has been removed and new functions are OnAutoItExitRegister() and OnAutoItExitUnregister(). I am confused which one and how to use in my case? Func OnAutoItExit() DllCallbackFree($HANDLE) DllClose($USER32_DLL) FileClose($DATA_FILE) EndFunc ;==> OnAutoItExit
wakillon Posted March 16, 2011 Posted March 16, 2011 Try like this : OnAutoItExitRegister ( 'OnAutoItExit' ) ;-- your script Func OnAutoItExit() DllCallbackFree($HANDLE) DllClose($USER32_DLL) FileClose($DATA_FILE) EndFunc ;==> OnAutoItExit AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
tempman Posted March 16, 2011 Author Posted March 16, 2011 Thank you, but can you explain to me why you use OnAutoItExitRegister and not OnAutoItExitUnregister?
wakillon Posted March 16, 2011 Posted March 16, 2011 Thank you, but can you explain to me why you use OnAutoItExitRegister and not OnAutoItExitUnregister?Helpfile is clear :OnAutoItExitRegister : Registers a function to be called when AutoIt exits.OnAutoItExitUnRegister : UnRegisters a function that was called when AutoIt exits.You want an action when your script is finished : So use OnAutoItExitRegister... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now