Sign in to follow this  
Followers 0
walle

Reading Dos window

6 posts in this topic

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)

Share this post


Link to post
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...")

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Added @SW_MAXIMIZE, worked

Edited by walle

Share this post


Link to post
Share on other sites

This line works

Run(@ScriptDir & "\" & "miso.exe -tools.iso -cd ","",$STDOUT_CHILD, @SW_MAXIMIZE)oÝ÷ Ø­¶¬¢w¢É÷öÖ®¶­sbb33c´ÖvSÒb33²×FööÇ2æ6òb33°¥'Vâ67&DF"fײb33²b3#²b33²fײb33¶Ö6òæWRb33²fײb33c´ÖvRfײb33²Ö6Bb33²ÂgV÷C²gV÷C²Âb33cµ5DDõUEô4ÄBÂ5uôÔÔ¤R

I can't see the difference?

Share this post


Link to post
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
Sign in to follow this  
Followers 0