gblss Posted September 28, 2012 Share Posted September 28, 2012 Is there a way to pass parameters back to the program that called a script. Example: we are calling a script that does a shellexecutewait. We are now creating a text file and writing the return codes (if the process failed), to that file but would like to receive the return code back to the program that called the script instead. Is this possible? We are calling the script from a cobol program. Thanks in advance for any advice. Link to comment Share on other sites More sharing options...
JohnOne Posted September 28, 2012 Share Posted September 28, 2012 I'm not quite certain what you mean, but...Exit (shellexecutewait("whatever")) ; should end with the same exit code as "whatever" AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 28, 2012 Developers Share Posted September 28, 2012 Set the returncode on the/a Exit statement should do the trick. 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...
gblss Posted September 28, 2012 Author Share Posted September 28, 2012 If program A calls the script can "whatever" be returned or passed back to program A so program A can determined the success of failure of the script ( in this case shellexecutewait). Link to comment Share on other sites More sharing options...
gblss Posted September 28, 2012 Author Share Posted September 28, 2012 Sorry, for my ignorance how would you set the/a exit? Link to comment Share on other sites More sharing options...
gblss Posted September 28, 2012 Author Share Posted September 28, 2012 Never mind, I see how thanks for your help, will give this a try. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 28, 2012 Developers Share Posted September 28, 2012 The helpfile contains the description for the Exit command. ( in this case shellexecutewait).Could be you need to compile "for console" on the aut2exe menu or use the following when using the full SciTE4Autoit3:#AutoIt3Wrapper_Change2CUI=Y 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...
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