Jump to content
Sign in to follow this  
lopolop

how does onautoitexit work?

Recommended Posts

lopolop

will this work...

Func OnAutoitExit()
    _Send()
    FileClose($file)
EndFunc

i have my code then at the end this i want to run that function, close the file, on autoit exit...

do i have to do more then just that func?


Share this post


Link to post
Share on other sites
SmOke_N

I don't know... does it? :P

It should :lmao:.. Just make sure that you put "Exit" in.

Func OnAutoitExit()
    _Send()
    FileClose($file)
    Exit
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
MHz

The example in the 1st post is valid.

I do not see a real need of adding Exit as the last line of OnAutoItExit ?

Share this post


Link to post
Share on other sites
SmOke_N

I had never used it before MHz, after reading through it, I agree with you.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
MHz

I had never used it before MHz, after reading through it, I agree with you.

A very handy function of AutoIt for cleaning up and anything else your script should finish with at the end of runtime. Not every script may suit using it but you may have been starving yourself of a good feature if you have not used it atleast once. :P

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  

×