September 1, 2008

How to send “Now Playing: Song” into any chat with a Hotkey

Posted in Intermediate at 10:31 pm by gloriouscomputing

I know what you want. You want to be more annoying to your friends on IRC and various IM clients!

That was my modivation for doing the following quick hack with AutoHotKey. AutoHotKey was basically designed to let you do all sorts of fun stuff with a hotkey.

I used to chat on BCDC++, which had the lovely command “/winamp”, which would send something like this to the chat “Bob is listening to: Funker Vogt – You Can Win If You Want”, because inquiring minds want to know.

After leaving college, and thereby the only useful place to use a DC++ hub, I’ve missed the “/winamp” command in my other chat clients, such as Pidgin.

So here’s how to get a hotkey to spam what song you are currently playing:

  • Install AutoHotKey, and make a new .ahk file, which you will run at startup
  • Set Winamp, or whatever player you prefer, to copy the current title of your song to the clipboard when you hit Ctrl+Alt+Num8 (or whatever you wish). In Winamp, you can do this under “Global Hotkey” Preferences, and then “General: Copy title”.
  • Add the following code to your AutoHotKey script

^!Numpad7::
Send /me is listening to “{Ctrl Down}{Alt Down}{Numpad8}{Alt Up}{Ctrl Up}{Ctrl Down}v{Ctrl Up}”{Enter}
return

That’s it! Now if you hit Ctrl+Alt+Num7 while in Pidgin, it will show:

***Bla is listening to “Modern Talking – You Can Win if You Want”

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: