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

sending keystrokes to the console

Thread Next
From:
Dennis.Warren
Date:
March 6, 2002 03:31
Subject:
sending keystrokes to the console
Message ID:
0AEF0EB21F09D211AE4E0080C82733BF02B83380@mailhost.aculab.com
Hi,

I am creating a perl/tk script to carry out speech recordings and to display
a
series of prompts & I want to run an external DOS program (for recording the
speech) 
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

Dennis

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About