Sign in to follow this  
Followers 0
Vindicator

to tell if the script was abnormally exited?

4 posts in this topic

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...

Share this post


Link to post
Share on other sites



OnAutoItExit + @ExitCode or @exitMethod?


[center]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.[/center]

Share this post


Link to post
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?


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

Share this post


Link to post
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]

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