apparle Posted February 20, 2008 Posted February 20, 2008 I want to call a commad and show the live output in a textbox or something else. Can anything be done
BigDod Posted February 20, 2008 Posted February 20, 2008 Lookup StdoutRead in the help file. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
rasim Posted February 20, 2008 Posted February 20, 2008 I want to call a commad and show the live output in a textbox or something else. Can anything be doneExample: #include <Constants.au3> Dim $ReadOut $cmd = Run(@ComSpec & " /c dir c: /b", "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) While 1 $ReadOut &= StdoutRead($cmd) If @error Then ExitLoop Wend MsgBox(0, "StdOut", $ReadOut)
blademonkey Posted February 20, 2008 Posted February 20, 2008 Example: #include <Constants.au3> Dim $ReadOut $cmd = Run(@ComSpec & " /c dir c: /b", "", @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) While 1 $ReadOut &= StdoutRead($cmd) If @error Then ExitLoop Wend MsgBox(0, "StdOut", $ReadOut) One thing to note, adding redirections will change your STDERR if you're trying to trap it. It's kind of mind numbing to combine command line level logic with autoit STDERR logic. ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now