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

Hi, I am trying to find & install a moudle to control key strokes to a win32 application. I have looked at Win32::CtrlGUI and Win32::GUITest but I don't know how to install them. I am reluctant to install any module that is not within the ActivePerl package manager since I'm not sure what I'm doing.

I have downloaded setupsup.1.0.1.0.zip from CPAN which I believe to be WIN32::CtrlGUI but I don't know what to do with it. Best I can tell is to extract all to perl/lib/win32 folder. Is this the latest version?

Can anyone help me with this please.

Thanks,
TAHAIC

Replies are listed 'Best First'.
Re: Send Key strokes to Win32 app
by ccn (Vicar) on Dec 09, 2008 at 14:47 UTC

    You can send keystrokes using preinstalled Win32::API module. Import from user32.dll and use
    UINT SendInput(UINT nInputs, LPINPUT pInputs, int cbSize) Windows API function

      Thank you all for sharing your wisdom.
Re: Send Key strokes to Win32 app
by svenXY (Deacon) on Dec 09, 2008 at 14:03 UTC
    Hi,
    without knowing too much about ActiveState Perl and ppm (last time I had to use it was years ago...), I think you should read A guide to installing modules for Win32 on how to properly install modules.

    It's actually quite funny that you are

    "reluctant to install any module that is not within the ActivePerl package manager"


    while at the same time you wildly want to copy stuff that you believe could be the right thing somewhere you believe could be the right place.

    PPM is definitely the thinggie to go with if you need to install modules on a Windooze box. Speaking of security - it all boils down to only adding repositories you trust - but that's up to you to decide.
    Regards,
    svenXY

Re: Send Key strokes to Win32 app
by marto (Cardinal) on Dec 09, 2008 at 14:08 UTC

    Hi TAHAIC,

    You may want to take a look at Installing Modules from the tutorials section of this site.

    "I am reluctant to install any module that is not within the ActivePerl package manager since I'm not sure what I'm doing."

    You may want to look at using PPM::Repositories to add some other repositories to ppm.

    Otherwise run the following from the command line to install Win32::GUITest:

    ppm install http://www.bribes.org/perl/ppm/Win32-GuiTest.ppd

    Hope this helps,

    Martin