Sign in to follow this  
Followers 0
Tippex

How do you put AutoIt in "quiet mode"?

7 posts in this topic

#1 ·  Posted (edited)

Very rarely (and not repeatable) an error would pop-up in my AutoIT program (something like "subscript not found for variable used in an array") for which I'd like to suppress once its compiled (ie. I need to turn off AutoIT error messages to the user) and if possible, handle (such as resetting the program or at least displaying my own friendly message). Is this possible please?

Thank you in anticipation,

Tippex

Edited by Tippex

Share this post


Link to post
Share on other sites



Is this what you seek?

From helpfile:

AutoItSetOption ( "option" [, param] )

RunErrorsFatal Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs:

1 = fatal error (default)

0 = silent error (@error set to 1)


My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

Triblade

In latest AutoIt version RunErrorsFatal option is removed.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

RunErrorsFatal option was only for Run(), RunWait().

For "array subscript" errors there is no way to globally catch such errors.

You must use precise testing and add your own checks at places before accessing array items where you expect problems/errors.

Compare your subscript index with UBound()

Edited by Zedna

Share this post


Link to post
Share on other sites

You can also is IsArray() to make sure that the data is an array


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites

Dôh...

Is it me, or isn't the helpfile updated as well muttley

Thanks for the advice. An "ErrorsFatal" setting would be great if it existed.

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