Sign in to follow this  
Followers 0
ReDFlaG

redirect output

3 posts in this topic

hello,

i'm new to this, i've searched thru the forum, read the help file and tryed some coding without any success.

i 'd like to create a shell for a dos tools (mbrwiz). I try to redirect the output of the dos prog to a graphical box but all i can have is the error code...

$val = RunWait(".\mbrwiz.exe /list", "", @SW_HIDE)

MsgBox(0, "Output:", $val & "!!")

Can some one help me? thanks.

Share this post


Link to post
Share on other sites



maybe this can help

; 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 = -1 Then ExitLoop
    MsgBox(0, "STDOUT read:", $line)
Wend

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

MsgBox(0, "Debug", "Exiting...")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thanks! i've been able to redirect it to a nice edit box :P

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