mikjay Posted October 25, 2009 Share Posted October 25, 2009 Hi all, I took a pretty comprehensive look through the forums to see if this had been addressed, so I apologize if this has been asked. I am wanting to run several commands from the command line, and run conditional statements based on the outcome and prompt. The window info tool only gives location info and doesn't read any text. Are there any UDFs or integrated functions that help this? Thanks! Link to comment Share on other sites More sharing options...
monoceres Posted October 26, 2009 Share Posted October 26, 2009 (edited) Automating console windows is annoyingly hard. Instead look at the run and stdoutread functions. Edited October 26, 2009 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
darkjohn20 Posted November 27, 2009 Share Posted November 27, 2009 Tried this not even 5 minutes before I read this post. If you still need help: #include <Constants.au3> Global $DOS, $Message $DOS = Run(@ComSpec & " /c Ping www.google.com", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While ProcessExists($DOS) $Message = StdoutRead($DOS, True) WEnd MsgBox(0, "Stdout Read:", $Message) 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