DarkBoost Posted December 21, 2010 Posted December 21, 2010 As the title suggests. I am trying to write the data from a command prompt to an array... in the console the results are listed perfectly but in the array it is not. Any suggestions? #include <Constants.au3> #include <Array.au3> Dim $run, $results, $array[1] $run = Run(@ComSpec & " /c dir c:\windows\*.exe /b", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $results = StdoutRead($run) If @error Then ExitLoop ConsoleWrite($results) _ArrayAdd($array, $results) Wend _ArrayDisplay($array)
DarkBoost Posted December 21, 2010 Author Posted December 21, 2010 I'm not sure how to explain what you are doing wrong, but here's the code to do it right.haha i love this line... i want to pin this up at work thanks this has worked perfectly!
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