Sign in to follow this  
Followers 0
Guest vDrag0n

Executing a command when exit

4 posts in this topic

On the exit of the script, via the system tray, is it possible to execute piece of code on exit?

Share this post


Link to post
Share on other sites



From helpfile:

OnExitFunc Sets the name of the function called when AutoIt exits (default is OnAutoItExit).

It is an option, so i towuld look something like this:

Opt("OnExitFunc", "OnAutoItExit")
While 1
    Sleep(1000)
WEnd
Func OnAutoItExit()
    MsgBox(0, "", "")
EndFunc

FootbaG

Share this post


Link to post
Share on other sites

This is an interesting question:

1) Because the answer is clearly documented

2) Because the answer is probably difficult to find in the help file unless you know the right combination of search terms.

Perhaps the documentation for the "Exit" keyword should list "OnAutoItExit" in the related section. :)


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Perhaps the documentation for the "Exit" keyword should list "OnAutoItExit" in the related section. :)

<{POST_SNAPBACK}>

Yea, it took me a while to find it, I never knew it existed until I saw it in someones code :D

FootbaG

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