Jump to content

StdoutRead displaying output in the scite console output instead of msgbox


Recommended Posts

Why not use example in help file!!??

 

#include <AutoItConstants.au3>

Local $line
Local $Run = Run("cmd.exe" & " /c " & "net stop wuauserv", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

While 1
    $line &= StdoutRead($Run)
    If @error Then ExitLoop
WEnd

MsgBox(0, "STDOUT read:", $line)
$Line = ""

While 1
    $line &= StderrRead($Run)
    If @error Then ExitLoop
WEnd

MsgBox(0, "STDERR read:", $line)

 

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

2 hours ago, Floops said:

Did you also replace $STDOUT_CHILD  with $STDERR_CHILD ?

Thanks a lot man. I forgot to change that. By the way. I have difficulty in converting non english characters from output to their proper form.

Can you or somebody else help with this matter,please?

 

 

Link to comment
Share on other sites

5 hours ago, funkey said:

Why not use example in help file!!??

 

#include <AutoItConstants.au3>

Local $line
Local $Run = Run("cmd.exe" & " /c " & "net stop wuauserv", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

While 1
    $line &= StdoutRead($Run)
    If @error Then ExitLoop
WEnd

MsgBox(0, "STDOUT read:", $line)
$Line = ""

While 1
    $line &= StderrRead($Run)
    If @error Then ExitLoop
WEnd

MsgBox(0, "STDERR read:", $line)

 

Thanks for pointing it out. I missed this example for some reason.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...