Sign in to follow this  
Followers 0
realkiller

net view Array display

6 posts in this topic

i made this script, the only thing i couldn't achief is making it in a array can somone help:) thx

#include <array.au3>
#include <Constants.au3>


Dim $line
$foo = Run(@ComSpec & " /c net view ", "",@SW_Hide, $STDOUT_CHILD)
$count = 1
While 1
    $line &= StdoutRead($foo) & @CRLF
    If @error Then ExitLoop
    $count +=1
Wend

MsgBox (0, "", $line)

Share this post


Link to post
Share on other sites



fixing your code to an array....

#include <array.au3>
#include <Constants.au3>


Dim $line[2]
$foo = Run(@ComSpec & " /c net view ", "",@SW_Hide, $STDOUT_CHILD)
$count = 1

While 1
    $iTemp = StdoutRead($foo)
    If @error Then ExitLoop
    $line[$count] = StringReplace($iTemp, @CRLF, "")
    $count +=1
    ReDim $line[$count + 1]
Wend

_ArrayDisplay($line, "Info")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Another appraoch to utilizing arrays

#include <array.au3>
#include <Constants.au3>

Dim $line = _ArrayCreate("")
$foo = Run(@ComSpec & " /c net view ", "",@SW_Hide, $STDOUT_CHILD)

While 1
    $iTemp = StdoutRead($foo)
    If @error Then ExitLoop
    _ArrayAdd( $line, StringReplace($iTemp, @CRLF, ""))
Wend

_ArrayDisplay($line, "Info")

... just bored..lol

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Posted Today, 12:53 PM

Last Seen: Today, 12:59 PM

Nice!!!!

... ask a question and split!

8)


NEWHeader1.png

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  
Followers 0