Jump to content

Problems capturing console output from command line process


Recommended Posts

Problem solved. Or should I say "bypassed". I added the following line in the code of the console app : 

setvbuf(stdout, 0, _IONBF, 0); (http://www.cplusplus.com/reference/cstdio/setvbuf/)

It's just unfortunate that I had to modify the code of the app. 

Maybe some details about stream buffering should be added on the page about StdoutRead in the AutoIt doc?

Hi ChristianDB,

that's interesting

excuse me, how do you use that line of code?

the DOS process is an your own DOS program written by you, and you have rewritten it? or in which other way have you used it?

thanks

 

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

Yes the DOS process is written here in the company. Basically we are looking for a way to test it using AutoIT. Ideally we don't want to modify the code only to enable automatic testing as we are providing this code to our clients. 

And to answer your first question, I just added the call to setvbuf in the beginning of the main function. 

Edited by ChristianDB
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...