I used this DOS command to see the needed output / or show all
Code:
/*
DOS command shows only the searched string
Dos command shows always all
*/
mycmd =netstat -e -s
srch =send ;this search for "send"
F3 =%temp%\test53.txt ;only searched string
F4 =%temp%\test54.txt ;the DOS command output
Gui,1:Font,,FixedSys
Gui,1:Add,Listbox, x10 y5 h190 w680 vLB1,
Gui,1:Add,button, x20 y200 h20 w100 gSTART,START
Gui,1:Show, x0 y0 h225 w700 , Searched string= %srch% for= %mycmd%
return
;-------------------------------------------------------
START:
Gui,1:submit,nohide
GuiControl,1:,LB1,| ;clear listbox
runwait,%comspec% /c %mycmd% |find /I "%srch%" >%F3%,,hide ;shows only found string
runwait,%comspec% /c %mycmd% |find /V "XXXBBB" >%F4%,,hide ;shows always all
;runwait,%comspec% /c %mycmd% >%F4%,,hide ; not always show
Loop,read,%F3%
GuiControl,1:,LB1,%A_LoopReadLine% ;listbox shows only lines with found words
run,%F4% ;this file shows all
return
;--------------------------------------------------------
Guiclose:
exitapp