Keypress automation?

Discussion in 'Perl Misc' started by Asmo, Jun 18, 2004.

  1. Asmo

    Asmo Guest

    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
     
    Asmo, Jun 18, 2004
    #1
    1. Advertisements

  2. Asmo

    Ben Morrow Guest

    Quoth (Asmo):
    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
     
    Ben Morrow, Jun 18, 2004
    #2
    1. Advertisements

  3. :> 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.
     
    Walter Roberson, Jun 18, 2004
    #3
  4. Asmo

    Eric Bohlman Guest

    -cnrc.gc.ca (Walter Roberson) wrote in
    If it's MS-Windows, use the SendKeys function from Win32::GUITest.
     
    Eric Bohlman, Jun 18, 2004
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.