Jump to content

StdoutRead + ConsoleWrite works but ArrayAdd does not


Recommended Posts

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)

post-24114-0-27477400-1292904018_thumb.j

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...