Jump to content

STDOUT Not Showing Everything From Console


Recommended Posts

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...

Link to post
Share on other sites
  • Developers

#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.
  :)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...