Jump to content

Recommended Posts

Posted

I have a C program and its source (so I know all the vars names). The program does some things and print text on the dos window. How can I read that text?

Posted (edited)

Look at my Net Send GUI wrapper

http://www.autoitscript.com/forum/index.ph...st&p=343332

#include <Constants.au3>

$computers = ''
    
$foo = Run(@ComSpec & ' /c net view', @ScriptDir, @SW_HIDE, $STDOUT_CHILD)

While 1
    $computers &= StdoutRead($foo)
    If @error Then ExitLoop
WEnd

ConsoleWrite ($computers & @CRLF)

EDIT: added include file

Edited by Zedna
Posted (edited)

Let's hope we'll get an answer soon because I need it soon :)

EDIT: Thanks! I'll try it.

How can this help me? :S

Edited by Aassdd
Posted (edited)

I should have used $STDOUT_CHILD

#include <Constants.au3>

$text = ""
    
    $wnd = Run("C:\Users\Alter\Desktop\.., "", @SW_HIDE, $STDOUT_CHILD)

    While 1
        $text &= StdoutRead($wnd)
        If @error Then ExitLoop
    WEnd

ConsoleWrite ($text & @CRLF)
Edited by Aassdd

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
×
×
  • Create New...