...and here is a working one I prepared earlier...
code:
Break on
$tempfile = "C:\templist.txt"
$Display = ""
Del $tempfile
$rc = ReDirectOutput($tempfile)
Use list
$rc = ReDirectOutput("")
If Open(1,$tempfile) = 0
$line=ReadLine(1)
While @ERROR = 0
If InStr($line, "IPC$$") = 0
$Display = $Display + $line + Chr(10) + Chr(13)
EndIf
$line=ReadLine(1)
Loop
$rc = Close(1)
EndIf
messagebox($Display, "Title", 0, 60)