Jump to content

Automating a console window?


mikjay
 Share

Recommended Posts

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

  • 1 month later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...