Jump to content
Sign in to follow this  

Need help with capturing console-app output

Recommended Posts



I've task as followed:

1. Console application (SomeApplication.exe) which runs file-comparer (fc.exe).

2. My AutoIt script have to get output of file-comparer and do some things in accordance to file-comparer output.


when I run SomeApplication.exe from script as:

Run(@ComSpec & " /c " & $CmdLine[1], "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

I successfully get all output from SomeApplication.exe by StdoutRead but nothing from file-comparer

And on the other hand when I use $STDIO_INHERIT_PARENT flag as

Run(@ComSpec & " /c " & $CmdLine[1], "", @SW_SHOW, $STDIO_INHERIT_PARENT)
- I see all output in console (application and file-comparer) but can't access it neither by StdoutRead nor ConsoleRead (@error <> 0).

Could anyone please help me, if can ?

PS. Script compiled as Console. AutoIt ver:autoit-v3.3.6.1-sfx.exe

Edited by Good4U

Share this post

Link to post
Share on other sites

I've found solution which works for me:


in this case StdoutRead captures all data (SomeApplication.exe and fc.exe)

but still don't understand why it not works without separate console.

Share this post

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
Sign in to follow this