develooper Front page | perl.beginners | Postings from March 2002

sending keystrokes to the console

Thread Next
March 6, 2002 03:31
sending keystrokes to the console
Message ID:

I am creating a perl/tk script to carry out speech recordings and to display
series of prompts & I want to run an external DOS program (for recording the
from my perl script.  

The problem is, once the program is called it requires further keystrokes -
RETURN to start the recording, and ESC to stop the recording.
I can set a default time for the recording process to run, thereby
circumventing the required
keystrokes, but that leaves me in the position of always running it for the
same amount of time,
and having to wait for the process to complete before continuing. I don't
want to do this if 
I can help it.

I know there maybe suggestions to use a different external program, but the
one I have
chosen is otherwise perfect for my needs.

Can I pass these particular keystroked to my external program?
I am currently calling the program using the simple system() command.
Will I need to change this to Win32::Process::Create.

Any help or suggestions gratefully received


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About