Jump to content

to tell if the script was abnormally exited?


Recommended Posts

Well, my script pretty much saves info you feed it, incase of something like an error (Example: IExplorer has an error, and windows must shut down)

How can I make my script tell if it was abnormally exited, and if it does, restart itself?

I have tried including a script with:

While 1

If ProcessClose("InfoSav.exe") Then Run("InfoSav.exe")

Wend

but it wont work!

If I hadn't said thank you yet, and you deserve it, than thank you...

Link to comment
Share on other sites

but I though If I used tht than the script will close before it gets a chance to execute the command?

How about

Func OnAutoItExit()
    If @ExitCode = $desiredcode Then
        Run($scriptname)
    EndIf
EndFunc
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...