Sign in to follow this  
Followers 0
vince100

onexit equivalent to ensure code execution before exit

5 posts in this topic

#1 ·  Posted (edited)

I'm working on a script to monitor and modify mouse cursor in a While loop.

How can I implement something like the "onexit" subroutine in AHK to ensure the mouse cursor is restored when the compiled script is terminated unexpectedly by Alt+F4 or by Task Manager?

Thanks

Edited by vince100

Share this post


Link to post
Share on other sites



wow, that was fast.

Thank you very much. I am sure it is exactly what I needed.

I couldn't find the documentation of the function in the help file. Maybe my version is too old (3.3).

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

OnAutoItExit was replaced by OnAutoItExitRegister in version v3.3.2.0 according to the History in helpfile. If you really have that version you should upgrade, AutoIt is after all free so you have no reason not to ;)

Edit: Download 3.3.6.1 here.

Also don't forget SciTE4AutoIt3. The SciTE included with AutoIt is only the "lite" version.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Thank you. I was using 3.3.0.0 and will upgrade to newest version.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0