Good4U Posted November 24, 2010 Share Posted November 24, 2010 (edited) Hello, 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. Problem: 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 November 24, 2010 by Good4U Link to comment Share on other sites More sharing options...
Good4U Posted November 25, 2010 Author Share Posted November 25, 2010 I've found solution which works for me: I used flags: $STDERR_CHILD + $STDOUT_CHILD + $RUN_CREATE_NEW_CONSOLE in this case StdoutRead captures all data (SomeApplication.exe and fc.exe) but still don't understand why it not works without separate console. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now