Jump to content

Reading Dos window


walle
 Share

Recommended Posts

I can see the window for a milisecond, it contains the information I need

but it flashes so fast that the StdoutRead($get) doesn't mange too read the

window. Do I need to save it into a .txt and then use something like

"StringLeft(StringStripWS ($StdOut, 8),17))"

#include <constants.au3>
$get = Run(@ScriptDir & "\" & "miso.exe -tools.iso -cd","",$STDOUT_CHILD)


While ProcessExists($get)
    ;Wait for program to finish
    Sleep(100)
WEnd
$StdOut = StdoutRead($get)
MsgBox(4000, "Results", $StdOut)
Link to comment
Share on other sites

Look at this (from helpfile at StdoutRead):

; Demonstrates StdoutRead()
#include <Constants.au3>

$foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

While 1
    $line = StdoutRead($foo)
    If @error Then ExitLoop
    MsgBox(0, "STDOUT read:", $line)
Wend

While 1
    $line = StderrRead($foo)
    If @error Then ExitLoop
    MsgBox(0, "STDERR read:", $line)
Wend

MsgBox(0, "Debug", "Exiting...")
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...