greenmachine Posted January 11, 2006 Share Posted January 11, 2006 Run (@AutoItExe & ' /autoit3executeline "msgbox (, ''hello'', ''hello'')" ') If you run that code in a script, regardless of whether it has the option for RunErrorsFatal set to 0, or an object event for AutoItError, you get a message box saying it was unable to execute the line. It shouldn't be able to execute it, which is fine, but I'd like to remove that box and replace it with a soft crash, like with runerrorsfatal = 0. Is there a way to let that happen? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 11, 2006 Developers Share Posted January 11, 2006 what about this version: Run ('"' & @AutoItExe & '" /autoit3executeline "msgbox (0, ''hello'', ''hello'')" ') 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...
greenmachine Posted January 12, 2006 Author Share Posted January 12, 2006 (edited) Run (@AutoItExe & ' /autoit3executeline "msgbox (, ''hello'', ''hello'')" ') If you run that code in a script, regardless of whether it has the option for RunErrorsFatal set to 0, or an object event for AutoItError, you get a message box saying it was unable to execute the line. It shouldn't be able to execute it, which is fine, but I'd like to remove that box and replace it with a soft crash, like with runerrorsfatal = 0. Is there a way to let that happen? I know the code has a missing 0, that's the point. What I wanted is to not see the error box when I try to run that. I see you also added a few quotes, they don't make a difference. My code works fine with just adding 0, but it wasn't about trying to get it to run correctly... the point was that if it is purposely done wrong, it shows an error message box that I want to know how to remove. Edited January 12, 2006 by greenmachine Link to comment Share on other sites More sharing options...
Valik Posted January 12, 2006 Share Posted January 12, 2006 (edited) The following should work but doesn't and I'm calling it a bug that it doesn't work:Run ('"' & @AutoItExe & '" /ErrorStdOut /autoit3executeline "msgbox (, ''hello'', ''hello'')" ')The bug is that AutoIt doesn't recognize both arguments that it accepts.Edit: "2 both" is bad poor grammar (Intentional). Edited January 12, 2006 by Valik Link to comment Share on other sites More sharing options...
John Posted January 12, 2006 Share Posted January 12, 2006 What you can do is redirect the output to a temp file the way editors redirct it to the debug window. Link to comment Share on other sites More sharing options...
John Posted January 12, 2006 Share Posted January 12, 2006 I guess valik axed that one LOL Link to comment Share on other sites More sharing options...
Valik Posted January 12, 2006 Share Posted January 12, 2006 What you can do is redirect the output to a temp file the way editors redirct it to the debug window.Come on now, that's not how editors do it at all! And since this is obviously a beta related question, the correct way to get the output back if the output is important is to use the I/O re-direction feature of Run() to harvest the data directly. None of that 1998 file redirection crap. Link to comment Share on other sites More sharing options...
John Posted January 12, 2006 Share Posted January 12, 2006 Come on now, that's not how editors do it at all! And since this is obviously a beta related question, the correct way to get the output back if the output is important is to use the I/O re-direction feature of Run() to harvest the data directly. None of that 1998 file redirection crap. Yes valik I was just studying that... My thinking is a bit ancient LOL. I tried running your code snip in compiled form. Run ('"' & @AutoItExe & '" /ErrorStdOut /autoit3executeline "msgbox (, ''hello'', ''hello'')" ') Compiled autoit will infinitely respawn itself with or without the msgbox fixed. Definately a bug... Link to comment Share on other sites More sharing options...
John Posted January 12, 2006 Share Posted January 12, 2006 Same thing with version 3.1.1 and 3.1.101 Link to comment Share on other sites More sharing options...
greenmachine Posted January 12, 2006 Author Share Posted January 12, 2006 The following should work but doesn't and I'm calling it a bug that it doesn't work: Run ('"' & @AutoItExe & '" /ErrorStdOut /autoit3executeline "msgbox (, ''hello'', ''hello'')" ') The bug is that AutoIt doesn't recognize both arguments that it accepts.Run ('"' & @AutoItExe & '" /ErrorStdOut /autoit3executeline "msgbox (, ''hello'', ''hello'')" ') That code fails because once it encounters /ErrorStdOut, it looks for a file, not more command line parameters. It needs to continue processing the command line to make sure none of the other supported options are specified. The above should attempt to run a mal-formed line of AutoIt code and silently fail because of the /ErrorStdOut argument. Well it's good to know that it is easy to have a silent fail and that the bug will be fixed soon. Thanks Valik. 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