Jump to content

While loop not being executed


Recommended Posts

I'm almost certain there's an obvious answer, but can someone tell me why in the following script I am not getting anything written to the output window in SciTE and I get a blank MsgBox, but a valid return value? Thanks!

#include <Constants.au3>
;...

$file_loc = @ScriptDir & "\test.au3"
$file_au3 = $file_loc
$foo = RunWait('"' & @ScriptDir & '\Autoit3\au3check.exe" "' & $file_au3 & '"',"", @SW_HIDE, $STDERR_CHILD+$STDOUT_CHILD)
ConsoleWrite('"' & @ScriptDir & '\Autoit3\au3check.exe" "' & $file_au3 & '"')
MsgBox(64,"Return value is",$foo)
$errch = ""

While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
$errch = $errch & $line
ConsoleWrite("I can't even see this line...")
WEnd

MsgBox(64,"",$errch)
;...
Link to comment
Share on other sites

You are using Runwait() in stead of Run()

He seems to want both the STDOUT and the EXITCODE. So something like lod3n's _RunReadStd() might be appropriate.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...