November 16th, 2009, 09:37 AM
Using pipes running apps
I am trying to run a command line program (in windows), so I use the following code:
Now, I have a problem, my WaveRecorder stops when I press Enter key.
cmd_pipe = popen ("WaveRecorder.exe temp.wav", "r");
Is there a way to simulate "Enter" into the pipe? Is it possible to write more than one command into the pipe?
November 16th, 2009, 03:28 PM
Re: Using pipes running apps
Command line programs which wait for the enter key are just waiting for the newline charicter "\n". You should be able to simply write that charicter to the pipe.
Notice the single quotes here not double quotes.
Hope this helps
Please use: [ code ][/ code ] tags and reasonably correct tabbing. They really help us read your code
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.