Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl's equivalent to Autoit's HotKeySet?

by jsteng (Beadle)
on May 08, 2018 at 05:05 UTC ( [id://1214189]=perlquestion: print w/replies, xml ) Need Help??

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

Is there a perl function that is equivalent of AutoIt's HotKeySet function?

I want to bind a set of keypresses such as:
CTRL-ALT-U
CTRL-ALT-P
etc
but without having the script in focus (such as the case with TK Bind).


Thanks.
  • Comment on Perl's equivalent to Autoit's HotKeySet?

Replies are listed 'Best First'.
Re: Perl's equivalent to Autoit's HotKeySet?
by jsteng (Beadle) on May 08, 2018 at 10:02 UTC
    Thanks to the 2 people above, I found something at Win32 that gives such a functionality:

    Win32::GlobalHotkey - Use System-wide Hotkeys independently

    Thanks!
Re: Perl's equivalent to Autoit's HotKeySet?
by Athanasius (Archbishop) on May 08, 2018 at 06:13 UTC
      Win32::AutoItX - Automate the Windows GUI using AutoItX

      Unfortunately, it is for AutoIt's GUI module. Something that I got stuck at AutoIt and decided to redo my codes in Perl.
Re: Perl's equivalent to Autoit's HotKeySet?
by LanX (Saint) on May 08, 2018 at 08:48 UTC
      Honestly, I once used Win32::GuiTest a long long time ago for such a purpose. I had my main loop listening to the keypresses until the appropriate sequence occurs then call the functions. It behaved like a keylogger which IMO is highly suspicious.

      Then I rewrote the script into AutoIt because it had HotKeySet function.

      However, when I got stuck with AutoIt's GUI, I decided to stick with Perl for good.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1214189]
Approved by Athanasius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found