Jump to content
Sign in to follow this  
ReDFlaG

redirect output

Recommended Posts

ReDFlaG

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
Valuater

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
ReDFlaG

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.