rbabcock Posted June 8, 2007 Share Posted June 8, 2007 If I use the Run command, I can redirect the 3 stdio handles. If I use the RunWait command, I can get the exit code of the program I run. Is there a way to do both at the same time? Thanks. Link to comment Share on other sites More sharing options...
MHz Posted June 9, 2007 Share Posted June 9, 2007 Sure is. Already have some UDFs created to handle returning the exitcode from Run() located here. Link to comment Share on other sites More sharing options...
rbabcock Posted June 10, 2007 Author Share Posted June 10, 2007 Thanks, looks like just what I need. I'll try it out Monday (this is for a work task). Link to comment Share on other sites More sharing options...
rbabcock Posted June 11, 2007 Author Share Posted June 11, 2007 I noticed that $h_Process is not declared in _ProcessOpenHandle which triggers an error if you use AutoItSetOption("MustDeclareVars", 1). I'm also confused by what this function returns. On error, it returns "Not SetError(1)", but the AutoIt help file says that SetError returns nothing unless the 3rd parameter is set. It's also not obvious from the comments that the handle returned on success is an array. I also worried about what would happen if the program finished before the call to _ProcessOpenHandle, but after inserting time delays to make sure this happened, nothing broke. Anyway, it does seem to be working for me. Thanks again. 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