Pain Posted November 22, 2008 Share Posted November 22, 2008 (edited) This is one of my functions that I'm using to get all active TCP and UDP connections. Func NetStat() Local $output $Std = Run(@ComSpec & " /c " & "netstat -a", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $output &= StdoutRead($Std) If @error Then ExitLoop Wend Return $output EndFunc The problem is the output, if I use Run(@ComSpec & " /c " & "netstat -a > stat.txt") I will get a nice list like this Aktiva anslutningar Prot. Lokal adress Extern adress Status TCP dator:microsoft-ds localhost:1032 LISTENING TCP dator:1098 dator:0 LISTENING TCP dator:1098 localhost:1032 ESTABLISHED If I print it with ConsoleWrite it still looks good but if I use GuiCtrlSetData($my_edit_control, NetStat()) it looks like this Aktiva anslutningar Prot. Lokal adress Extern adress Status TCP dator:microsoft-ds localhost:1032 LISTENING TCP dator:1098 dator:0 LISTENING TCP dator:1098 localhost:1032 ESTABLISHED Edited November 22, 2008 by Pain Link to comment Share on other sites More sharing options...
ProgAndy Posted November 22, 2008 Share Posted November 22, 2008 (edited) use a font with fixed letter size in your Edit (e.g. "Lucida Console") Edited November 22, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Pain Posted November 22, 2008 Author Share Posted November 22, 2008 Thanks alot, I would never have thought about that. 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