Qball Posted March 14, 2008 Share Posted March 14, 2008 (edited) i have tried to use the ConsoleRead() function but i cant seem to get it to work im using command prompt and yes i compiled the script as a console program is it just not supposed to work for command prompt or is the command format different than other programs? i used do $data = ConsoleRead() until @error ConsoleWrite("recieved:") ConsoleWrite($data) the consolewrite thing works but $data is always blank... please help =) Edited March 14, 2008 by Qball Link to comment Share on other sites More sharing options...
DjDeep00 Posted March 14, 2008 Share Posted March 14, 2008 @Qball....I am currently on 3.2.4.9 and I am using the following example from the help file and it works fine... ; 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 More sharing options...
MHz Posted March 14, 2008 Share Posted March 14, 2008 Example here of using ConsoleRead(). Compiled as CLI seems to work also. Link to comment Share on other sites More sharing options...
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