Keypress automation?

A

Asmo

Hi, I'm trying to write some scripts that open up other programs, then
send keypresses to them. I'm trying to use this report generation
software, and hopefully automate the report generation process, but it
prompts for start and end dates for the report, and if I could manage
to automate that, it would simplify my life immensely.

Is there a module I should look for, or something?

Thanks guys.

Steve
 
B

Ben Morrow

Quoth (e-mail address removed) (Asmo):
Hi, I'm trying to write some scripts that open up other programs, then
send keypresses to them. I'm trying to use this report generation
software, and hopefully automate the report generation process, but it
prompts for start and end dates for the report, and if I could manage
to automate that, it would simplify my life immensely.

Is there a module I should look for, or something?

What sort of program is it, and what OS?

If it's a GUI program, you're out of luck. If it's a a text-mode
program, and you're on a Unixish OS, then you want Expect.pm. If you're
not, then you still want Expect.pm but it probably doesn't work on your
platform... :(

Ben
 
W

Walter Roberson

:> Hi, I'm trying to write some scripts that open up other programs, then
:> send keypresses to them. I'm trying to use this report generation
:> software, and hopefully automate the report generation process, but it
:> prompts for start and end dates for the report, and if I could manage
:> to automate that, it would simplify my life immensely.

:What sort of program is it, and what OS?

:If it's a GUI program, you're out of luck. If it's a a text-mode
:program, and you're on a Unixish OS, then you want Expect.pm.

If it is an X Windows based program, you could probably synthesize
some key presses, and the application wouldn't notice the difference
unless it specifically disabled synthetic keys. If it is X Windows and
the form will always be in the same place, then there are programs out
there to automate this sort of thing.

If it is MS Windows... I don't know. My little- enough- to- be- dangerous
reading would suggest that if you had a service which had been given
permission to interact with the desktop, that you could perhaps
accomplish what you want. It's not too different from what some of the
installers have to do sometimes.
 
E

Eric Bohlman

(e-mail address removed)-cnrc.gc.ca (Walter Roberson) wrote in
If it is MS Windows... I don't know. My little- enough- to- be- dangerous
reading would suggest that if you had a service which had been given
permission to interact with the desktop, that you could perhaps
accomplish what you want. It's not too different from what some of the
installers have to do sometimes.

If it's MS-Windows, use the SendKeys function from Win32::GUITest.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top