jjj Posted June 16, 2006 Share Posted June 16, 2006 I am trying to catch all autoit errors and write them to a log file instead of popping up a message box. Also, i want the script to exit quietly if it encounters a fatal error. Is this possible? I havent been able to find anything directly relating to this on the forums, or the help file. Thanks in advance! Link to comment Share on other sites More sharing options...
Developers Jos Posted June 16, 2006 Developers Share Posted June 16, 2006 I am trying to catch all autoit errors and write them to a log file instead of popping up a message box. Also, i want the script to exit quietly if it encounters a fatal error.Is this possible? I havent been able to find anything directly relating to this on the forums, or the help file.Thanks in advance!There is no ON ERROR like VB, only for COM objects.Its just a matter of proper error checking and you shouldn't get any errors... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Champak Posted June 29, 2006 Share Posted June 29, 2006 (edited) Do you think that this ON ERROR function would be included at some point? I was actually looking for something similar. My situation isn't really a programming error issue. The user would have to input the path to a particular application to use a menu item, now if they don't remember to input that path, when they try to use that menu button they get the dreaded autoit error pop up. What I wanted to do was some type of error handling where a pop up would actually say "you did not input the path" instead of a bunch of gobbly gupe....I used variables so it looks like a bunch of gobbly gupe. I tried If @error Then MsgBox(16, "Failure", "blah.") on the line after the Run command but it didn't work Is there a way to do this, or am I stuck with the autoit error pop up if the path isn't inputted? Also I don't see a definitive way of using error handling in the help file, can I get some directions on where to get clear info on it? Thanks. Edited June 29, 2006 by Champak Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 29, 2006 Moderators Share Posted June 29, 2006 (edited) Do you think that this ON ERROR function would be included at some point? I was actually looking for something similar. My situation isn't really a programming error issue. The user would have to input the path to a particular application to use a menu item, now if they don't remember to input that path, when they try to use that menu button they get the dreaded autoit error pop up. What I wanted to do was some type of error handling where a pop up would actually say "you did not input the path" instead of a bunch of gobbly gupe....I used variables so it looks like a bunch of gobbly gupe. I tried If @error Then MsgBox(16, "Failure", "blah.") oÝ÷ ÚíébæµêíänÊ&©ÝnëbµØmÂä"Ëaz·Á¬¡Ú-+(©²ÛØ^jëh׫®é¢©ûaz+'ßÛbµç@Êv÷öÛy§^~)â¶+ÞÁ¬¨~ë"«®ájwex"Ø^éi~)^q©Èël¢g·¶*'²ðêÞ¶µÉ^j¸§~'Ôájy,þ«¨µå¨ºWgßÛm«ljeÉ·yú+{*.®»§jëh×6 If $Var_That_Holds_My_Path_Value = '' Then MsgBox(16, "Failure", "blah.") oÝ÷ ØGb´êѺq+®ájwex%G+ºÚ"µÍÜ ÌÎNÔ[ÜÑ][ ÌÎNË B[ ÌÎNÕÚ]]^IÌÎNÊBYÜ[ÙÐÞ M ÌÎNÕØ[ÉÌÎNË ÌÎNÕ[ÜXÚYXÙYØØ][ÛÜ[IÌÎNÊDon't change the "Whatever.exe" and run it, you should get the msgbox. Edited June 29, 2006 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Champak Posted June 29, 2006 Share Posted June 29, 2006 You have such timing. I was just returning to say I solved it, but I used: Opt("RunErrorsFatal", 0) and If @error = 1 Then MsgBox(0, 'blah', 'error') Thanks anyway. But I might be back in a little bit, I'm trying to go over a few other error things that need input from the user that aren't using the Run command. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 29, 2006 Moderators Share Posted June 29, 2006 Lmao, read my edited post 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. Link to comment Share on other sites More sharing options...
Champak Posted June 29, 2006 Share Posted June 29, 2006 Call us Quick Draw. Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2012 Share Posted March 24, 2012 (edited) I would it to work for the run command but it does not? Edited March 24, 2012 by Guest Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now