PerryRaptor Posted February 11, 2006 Posted February 11, 2006 I'm unable to capture all of the text on the console. There is another line of text that I need. #include <Constants.au3> $WinXP_Firewall_ICMP_Show = "Netsh firewall show icmpsetting" $Console = Run(@ComSpec & " /c " & $WinXP_Firewall_ICMP_Show, @SystemDir, @SW_HIDE, $STDOUT_CHILD) $Console_Output = StdoutRead($Console) MsgBox(0, "ICMP Status", $Console_Output) I'm using beta +.107. If I wrap the procedure in a While - Wend I can get the additional text; however, I only want one button press to close MsgBox(), not every line. #include <Constants.au3> $WinXP_Firewall_ICMP_Show = "Netsh firewall show icmpsetting" $Console = Run(@ComSpec & " /c " & $WinXP_Firewall_ICMP_Show, @SystemDir, @SW_HIDE, $STDOUT_CHILD) While 1 $Console_Output = StdoutRead($Console) MsgBox(0, "ICMP Status", $Console_Output) Wend Ideas are welcomed...
Developers Jos Posted February 11, 2006 Developers Posted February 11, 2006 #include <Constants.au3> $Console_Output = "" $WinXP_Firewall_ICMP_Show = "Netsh firewall show icmpsetting" $Console = Run(@ComSpec & " /c " & $WinXP_Firewall_ICMP_Show, @SystemDir, @SW_HIDE, $STDOUT_CHILD) While 1 $Console_Output &= StdoutRead($Console) If @error = -1 Then ExitLoop Wend MsgBox(0, "ICMP Status", $Console_Output) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
flyingboz Posted February 11, 2006 Posted February 11, 2006 You can always pipe the output to a temp file and parse it. No fuss, no muss. Perhaps not as elegant, but then again, you'd be done by now Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
PerryRaptor Posted February 11, 2006 Author Posted February 11, 2006 Thanks JdeB, I've never used "&=" before...I'll have to remember that trick
andyswarbs Posted February 11, 2006 Posted February 11, 2006 See my Run into an array etc and I think you will feel happier. Licensing.au3Extended _Max & _Min_MsgBoxExitVarious extensions to _GuiCtrl...Run Dos programs output into an array etc (Updated 19-Feb-06)Extensions to Array library, primarily in two dimensions (updated 20-Feb-06)Version dependency calculator, _IsVer1GEVer2User Management, answering some domain questions (updated 19-Feb-06, various bugfixes and new functions added)Extensions to registry manipulation, including a recursive search & replaceDelimited string library (updated 19-Feb-03, added _DelimListSort)String library extensionsTerminal Server supportFile libraryCommand line parser (added 18-Feb-06)(UDF homepage) (Scit4Au3 UserCallTips added 21-Feb-06)
PerryRaptor Posted February 12, 2006 Author Posted February 12, 2006 Andy, I did try your STDOUT to Array functions. They are nice and definately good work; however, I prefer the quick and lean method considering the size of the script and all of the procedures.
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