Jump to content
Sign in to follow this  
uplink477

Error's

Recommended Posts

uplink477

Is there anyway to make my program restart without showing an error message if in the unlikely event that there is an error that would usually cause the program to crash?

Share this post


Link to post
Share on other sites
Valuater

There should not be any "scripting errors", for COM errors you can register an error handler...

... So, what type of errors are you talking about?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
uplink477

There should not be any "scripting errors", for COM errors you can register an error handler...

... So, what type of errors are you talking about?

8)

I mean any error that would cause a popup message saying Autoit Error blah blah blah followed by the process closing and the script/program no longer running. i have a fairly solid script it doesnt have any error's when i run it on my computer but how can i be sure it wont when someone else runs it. if you get what i mean.

Share this post


Link to post
Share on other sites
Valuater

I mean any error that would cause a popup message saying Autoit Error blah blah blah followed by the process closing and the script/program no longer running. i have a fairly solid script it doesnt have any error's when i run it on my computer but how can i be sure it wont when someone else runs it. if you get what i mean.

There should not be any, however, only continually testing the script will tell for sure!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
uplink477

I see, when a compiled script does have an error, is the error title the same for all error's or does it change for specific things? iam thinking if i have a separate proccess that simply check's for the window title of an autoit error message and when or if it occurs it closes that window restarts the main program but then also displays a message to contact me about the problem? sort of like haveing custom error messages or a custom error routines. Instead of just displaying an Autoit error that the user while more than likely have no clue about and shutting itself down?

Edited by uplink477

Share this post


Link to post
Share on other sites
amokoura

the runtime error messages differ.

For example, array index error

Maybe the window title is always the same??

Share this post


Link to post
Share on other sites
ChrisL

I see, when a compiled script does have an error, is the error title the same for all error's or does it change for specific things? iam thinking if i have a separate proccess that simply check's for the window title of an autoit error message and when or if it occurs it closes that window restarts the main program but then also displays a message to contact me about the problem? sort of like haveing custom error messages or a custom error routines. Instead of just displaying an Autoit error that the user while more than likely have no clue about and shutting itself down?

There is a process watcher in my signature below.

If the main script is closed or killed then the watcher will relaunch the main script.

But you must read the script carefully you need to have a method which closes the watcher when you really want to exit the script. Also the script must be compiled!

Share this post


Link to post
Share on other sites
uplink477

There is a process watcher in my signature below.

If the main script is closed or killed then the watcher will relaunch the main script.

But you must read the script carefully you need to have a method which closes the watcher when you really want to exit the script. Also the script must be compiled!

that is sorta where i want to head. but i doesnt really check for errors. that is what iam trying to achieve not just restart the program. because if a program does have an error it isnt going to close till the error message is acknowlaged

Share this post


Link to post
Share on other sites
amokoura

The main script could have an adlib function that would update a value in a text file for example. If the value is "old", the monitor script will kill the process and restart.

Share this post


Link to post
Share on other sites
Prophet

I wrote a function that does something similair for a p2p app. If the p2p isn't running it checks for error window for the application. It closes the error window and restarts the p2p app, but user will problably see the error unless you check for errors every second or so. If you want I can post the script when i get home.


+==================================================================+| The Definition of Madness: Creating a GUI, with GUI automation scripts |+==================================================================+

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.