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

Hi All,

I have one application, which will be used for logging. This application will start logging when we press F5 function key. I want to automate the process using perl script so that whenever I want to log, I will run the script. The script should open the application and it should send the F5 function key to that application for logging.

Can we autohit function keys using perl script? If so what module needs to be used. Please help me

  • Comment on Sending Function Keys(F1-F12) to application?

Replies are listed 'Best First'.
Re: Sending Function Keys(F1-F12) to application?
by marto (Cardinal) on Apr 05, 2013 at 11:27 UTC

    You haven't given enough information to answer this question fully. What operating system are you running? Are you simply trying to automate a third party app? If the answers to these questions are "Microsoft Windows" and "Yes" then Win32::GuiTest and it's FindWindowLink/SendKeys method will let you find the applicaiton window and send whatever keystrokes you require. If there's more to the question you need to let us know. How do I post a question effectively?.

      Thanks for the response and sorry for not providing enough information

      Yes, I am using Windows OS, trying to automate the 3rd party application.