Hi all,
I know how to start a process and use my own streamwriter
to provide input. But now the question is, how do I know
when a process/console program needs input?
So for example, say there's a console program called
"a.exe" that first outputs some messages and then prompts
for a number for further calculation. I know how to use the
proc.StandardOutput to get the message, but I have no idea
when it prompts, and furthermore, control doesn't seem to
flow back to my program when a.exe is prompting.
Just a note that a.exe is only an example and I need to be
able to handle any console programs. You can think of it
more like my version of cmd.exe
Any ideas are appreciated. Thanks.