Jump to content

turn off runtime error message


Recommended Posts

hi all,

i'm new to autoit. i would like to turn off the runtime error popup message. and write into a log file. any internal function support this?

Please help. thanks.

Be more specific.

What exactly is "runtime error popup message"?

Is it from another application or from your own?

Post your script here if you have it.

Link to comment
Share on other sites

Be more specific.

What exactly is "runtime error popup message"?

Is it from another application or from your own?

Post your script here if you have it.

I could be wrong, but I believe he's referring to the error you get when there's any bug in your program and it's compiled.

The one like:

"Autoit error, Line X"

I, too would like to know how to remove that. Sometimes I accidently let errors slip past, and I would rather it just exit or have a custom one one something.

Link to comment
Share on other sites

I could be wrong, but I believe he's referring to the error you get when there's any bug in your program and it's compiled.

The one like:

"Autoit error, Line X"

I, too would like to know how to remove that. Sometimes I accidently let errors slip past, and I would rather it just exit or have a custom one one something.

For that case always use Scite4AutoIt3 (for testing/running/compiling) and its natively embeded Au3Check & AutoItWrapper.

Also look at Opt("RunErrorsFatal").

Also make error checking in your scripts:

if not fileexists()

UBound()

etc.

Then you will not have runtime problems.

Edited by Zedna
Link to comment
Share on other sites

Be more specific.

What exactly is "runtime error popup message"?

Is it from another application or from your own?

Post your script here if you have it.

ok...

the runtime error like the RUN() unable to execute the external program due to file missing.

i would like to write into log file instead of popup AutoIt error message.

Link to comment
Share on other sites

ok...

the runtime error like the RUN() unable to execute the external program due to file missing.

i would like to write into log file instead of popup AutoIt error message.

That one is easy, and pretty much the only "Error" that you can stop from popping up. Look up RunErrorsFatal in the help file!

opt("RunErrorsFatal",0)

Put the preceding line of code at the beginning of your script, and then check the @error macro after using the run() function to see if there was a problem or not.

Link to comment
Share on other sites

hi all,

i'm new to autoit. i would like to turn off the runtime error popup message. and write into a log file. any internal function support this?

Please help. thanks.

You can allways use /ErrorStdOut to redirect interpreter errors to STDOUT instead of having a MSGBOX popup. See help file "Running Scripts".

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

You can allways use /ErrorStdOut to redirect interpreter errors to STDOUT instead of having a MSGBOX popup. See help file "Running Scripts".

Very interesting! Although I think I will still be of the opinion that writing cleaner/better code (so that you don't HAVE the errors) is usually the way to go, this feature could be useful.

Link to comment
Share on other sites

That one is easy, and pretty much the only "Error" that you can stop from popping up. Look up RunErrorsFatal in the help file!

opt("RunErrorsFatal",0)

Put the preceding line of code at the beginning of your script, and then check the @error macro after using the run() function to see if there was a problem or not.

@dev/null/ - Thank you.

Is there anyway to put that into a script? Instead of AutoIt3.exe [/ErrorStdOut] [/AutoIt3ExecuteScript] file [params ...]

Like an Opt() command?

Edited by magician13134
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...