bkiahg has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I am looking for some direction. I want to write a perl script that sends commands to an already running program. Basically mimic keyboard strokes and then read the data coming to the monitor. Is there a module out there to help with this, or perhaps some good reading material. It will run mostly on WinXp.

Thanks in advance.

Replies are listed 'Best First'.
Re: Running a Program through Perl
by tachyon (Chancellor) on Oct 04, 2004 at 21:28 UTC

    It depends on the program. Is it a GUI application? A console application? A service? Did you write it? Does it have an API you can hook? I suspect you may be after Win32::GUITest but you need to supply more details. Do you really mean it will only run on XP?

    cheers

    tachyon

      Yes it is a gui application. The only machines that I plan on running it on would be xp boxes. I don't believe it has an API.

      Will read up on Win32::GUITest

      Thanks

        Seeing you don't appear keen to name your app I suggest you also look at Win32::OLE which hooks the OLE API that almost all M$ and many 3rd party apps do have.