need your help with a problem i can't solve myself.
I need to "remote control" a 3rd party application from my wxWidgets app. The 3rd party app is a console app, while my wxApp is a windows GUI one.
I wrote a class to start a process and capture stdin, stdout and stderr, so i can receive output from the other app and write (input) to it. My class worked fine with many other 3rd party apps.
With that app it works too, but this app seems using output buffering. So when i wait for the welcome message of the other app, i don't receive it. But i need to send some commands to it after the welcome message showed up.
When i just wait a period of time and then send some input while holding fingers crossed (hoping that the other app is already ready to receive), then suddenly i receive a whole bunch of information from the other app. So capturing works fine, but i need more "realtime" control.
So that is not a good solution too.
If i start that app in a normal dos-shell environment, the welcome message is output immediately (what i want to happen when started from within my app as well).
Seems that app recognize if it is started in terminal mode or with captured streams.
I have no access to the sourcecode of the 3rd party app. So i'm not able to inject some "flush" commands in the code.
Anyone has an idea how i can mimic an "interactive terminal mode" to this other app? Or someone knows a wrapper app where i can throw in my commandline and that will mimic it the right way and pass-through the in/output to and from my app to the other app?
Any hint very appreciated. Thank you in advance very much!