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

Brethern --

Anyone know of a way to have a script sit around (on Windoze) and waiting for a magic key combo to show up and then execute something no matter what program is in focus?

File this one under laziness: The reason I want to do this is that while I'm working all day and listening to my music, invariably some song will come up that I don't feel like listening to. I want to be able to hit a key combo (no matter what program I am in) to skip the song. I'm saying I'm too lazy to bring up winamp, skip the song, and go back to the program I was working in. Pretty lazy, huh?

Much thanks,
mdog

Replies are listed 'Best First'.
Re: Watch for keyboard key sequence
by Albannach (Monsignor) on Apr 15, 2004 at 18:58 UTC
    Quick thought: write a little script using Winamp::Control, create a shortcut to it, then just associate a Windows hot key combo to that shortcut. I use this for a number of Perl utilities I use frequently, though not Winamp yet. This means your app doesn't have to be watching the keyboard all the time.

    --
    I'd like to be able to assign to an luser

      Great idea! I should have thought of that! Thanks a bunch!