Jump to content



Go to solution Solved by Gianni,

Recommended Posts

Hello everyone, I can't write to file the output, in the Autoit console though I can see it, nothing works. I have tried everything. At this point I need some help.

Local $core = @ProgramFilesDir&"\myprogramX\core.exe"

$run = RunWait($core & ' -m="'&$modules&'" -i="'&$ArrSource[$i]&'" -p="'&$Preset&'" -x="'&$configxml&'" -o="'&$output&'"',@ScriptDir,@SW_HIDE,$STDIO_INHERIT_PARENT)


Edited by rootx
Link to comment
Share on other sites

Hi I figured out my problem, RunWait pauses the Autoit script until the process finishes consequently it doesn't read $STDERR_CHILD + $STDOUT_CHILD, so I would like to know how to directly read the output from the Autoit console by using RunWait and $STDIO_INHERIT_PARENT together. That's the only way I found, could you give me some advice to solve the problem?

PS: with run and $STDERR_CHILD + $STDOUT_CHILD obviously works, but I need to process multiple files in a loop one at a time, which is why I need RunWait.


Edited by rootx
Link to comment
Share on other sites

  • rootx changed the title to $STDIO_INHERIT_PARENT [HELP]
  • Solution

... so RunWait doesn't seem right for your purpose

why not use "run" instead, so you can read the streams of your "core.exe" program and continue with the next file when the execution of a "run" is finished ....

something like this ... (obviously not tested)

For $i = 0 To UBound($ArrSource) - 1

    $run = Run($core & ' -m="' & $modules & '" -i="' & $ArrSource[$i] & '" -p="' & $Preset & '" -x="' & $configxml & '" -o="' & $output & '"', @ScriptDir, @SW_HIDE, $STDIO_INHERIT_PARENT)

    While ProcessExists($run)



image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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

  • Recently Browsing   0 members

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