Joon 1 Posted March 10, 2006 Is there way to surpress any error message from AutoIt? Have it just quit without and dialog. Such as these kind of errors. Dim $array[2] $array[3] = 2 Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 Is there way to surpress any error message from AutoIt? Have it just quit without and dialog. Such as these kind of errors. Dim $array[2] $array[3] = 2Code it correctly? 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. Share this post Link to post Share on other sites
MHz 80 Posted March 10, 2006 Just set the script to restart... If Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut') Exit EndIf Crash'n'Burn silently. Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 (edited) Just set the script to restart... If Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut') Exit EndIf Crash'n'Burn silently.I was being funny... I hope you took it as that, I searched all over... and couldn't find anything but MHz's COM error handling, and low and behold, look who posts a solution . Edit: Now I'm wondering if this was a joke ? No matter what the situation, an error or not... Mine bites the dust. Have a working example MHz? Edited March 10, 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. Share this post Link to post Share on other sites
Jos 2,165 Posted March 10, 2006 I was being funny... I hope you took it as that, I searched all over... and couldn't find anything but MHz's COM error handling, and low and behold, look who posts a solution .Edit:Now I'm wondering if this was a joke ? No matter what the situation, an error or not... Mine bites the dust. Have a working example MHz?Did you compile it and run the EXE ? 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. Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 (edited) Did you compile it and run the EXE ?LOL...yeah... Went APE **** Edited March 10, 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. Share this post Link to post Share on other sites
Valuater 129 Posted March 10, 2006 (edited) LOL...yeah... Went APE **** thats....SHOW ME SOME SCRIPT8)you changed it??? Edited March 10, 2006 by Valuater Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 thats....SHOW ME SOME SCRIPT8)you changed it???Yeah... cuz it looked like I was demanding Jdeb to show me a script... and I was trying to be funny... Soooo I just edited it. 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. Share this post Link to post Share on other sites
MHz 80 Posted March 10, 2006 Hmm, time for another tasty Cocktail to wet the taste. Oh, SmOke_N, is that some kinda loop ya saying. It needs another edit to make me loop again. Share this post Link to post Share on other sites
Jos 2,165 Posted March 10, 2006 Try this version: If Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut /Dummy') Exit EndIf Dim $array[2] $array[3] = 2 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. Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 Try this version: If Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut /Dummy') Exit EndIf Dim $array[2] $array[3] = 2I didn't know if I should try that version!!! ... /Dummy felt like it was pointed at me Yes this one works perfectly!! 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. Share this post Link to post Share on other sites
Jos 2,165 Posted March 10, 2006 ... /Dummy felt like it was pointed at me Sort of .... nah not really .... Just expected you to solve this yourself ... 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. Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 (edited) Hmm, time for another tasty Cocktail to wet the taste. Oh, SmOke_N, is that some kinda loop ya saying. It needs another edit to make me loop again. This is what I ran ... I ran it both ways... With an error and withoutIf Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut') Exit EndIf HotKeySet('{END}', 'TestSilentExitOnly') HotKeySet('{PAUSE}', 'TestSilentExitRestart') HotKeySet('ESC', 'EXITNOW') While 1 Sleep(1000) WEnd Func TestSilentExitOnly() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 1', $array[2]) EndFunc Func TestSilentExitRestart() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 2', $array[2]) EndFunc Func EXITNOW() Exit EndFunc Then With Jdebs /Dummy it works:If Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut /Blah') Exit EndIf HotKeySet('{END}', 'TestSilentExitOnly') HotKeySet('{PAUSE}', 'TestSilentExitRestart') HotKeySet('ESC', 'EXITNOW') While 1 Sleep(1000) WEnd Func TestSilentExitOnly() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 1', $array[2]) EndFunc Func TestSilentExitRestart() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 2', $array[2]) EndFunc Func EXITNOW() Exit EndFunc Edited March 10, 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. Share this post Link to post Share on other sites
MHz 80 Posted March 10, 2006 (edited) Goes to show, if you want no errors silently, then you need to toss some errors in, to make it work. Good work, JdeB. Edit: Sorry, my example did go stupid with executing... Edited March 10, 2006 by MHz Share this post Link to post Share on other sites
SmOke_N 210 Posted March 10, 2006 Sort of .... nah not really .... Just expected you to solve this yourself ... I deserve that I guess 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. Share this post Link to post Share on other sites
Joon 1 Posted March 10, 2006 (edited) This is what I ran ... I ran it both ways... With an error and withoutIf Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut') Exit EndIf HotKeySet('{END}', 'TestSilentExitOnly') HotKeySet('{PAUSE}', 'TestSilentExitRestart') HotKeySet('ESC', 'EXITNOW') While 1 Sleep(1000) WEnd Func TestSilentExitOnly() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 1', $array[2]) EndFunc Func TestSilentExitRestart() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 2', $array[2]) EndFunc Func EXITNOW() Exit EndFunc Then With Jdebs /Dummy it works:If Not $CMDLINE[0] Then Run(@ScriptFullPath & ' /ErrorStdOut /Blah') Exit EndIf HotKeySet('{END}', 'TestSilentExitOnly') HotKeySet('{PAUSE}', 'TestSilentExitRestart') HotKeySet('ESC', 'EXITNOW') While 1 Sleep(1000) WEnd Func TestSilentExitOnly() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 1', $array[2]) EndFunc Func TestSilentExitRestart() Local $array[3] $array[2] = 2 MsgBox(0, 'Testing 2', $array[2]) EndFunc Func EXITNOW() Exit EndFunc I'm sure what I am doing wrong but there was no error in your code. If throw in error, it still display error message. The problem I am facing is that my script runs from the network share. When network connect is lost users will get error message on next step on the script (attached). This is what I want to surpress. Note: they still have connection to the database just not to the fileshare. Edited March 10, 2006 by Joon Share this post Link to post Share on other sites
Jos 2,165 Posted March 10, 2006 I'm sure what I am doing wrong but there was no error in your code. If throw in error, it still display error message.The problem I am facing is that my script runs from the network share. When network connect is lost users will get error message on next step on the script (attached). This is what I want to surpress. Note: they still have connection to the database just not to the fileshare.For com errors you need to use the COM error handler ... is explained in the Helpfile ... 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. Share this post Link to post Share on other sites
Joon 1 Posted March 10, 2006 For com errors you need to use the COM error handler ... is explained in the Helpfile ...That will do. All other function seems to stay in memory. Thanks. Share this post Link to post Share on other sites