The RubeTube

Life's a cube.  Solve it.


May 08, 2007
It's been a long time since the last edition of TechBits, so I promise that this one is really good. If you use iTunes, here's how to control iTunes (play/pause, previous/next track) without having to up the iTunes window! Yes, even if you don't have a multimedia keyboard!
  1. Download and install AutoHotkey. AutoHotkey is a handy-dandy free utility for programming keyboard hotkeys. Don't worry; it takes up very few resources and it's safe!
  2. Fire up the text editor of your choice and create a text file called AutoHotkey.ahk in My Documents, with the following contents:

  3. DetectHiddenWindows, On
    #/::
    IfWinExist, ahk_class iTunes
    ControlSend, ahk_parent, {SPACE} ; Pause/Play
    return
    #,::
    IfWinExist, ahk_class iTunes
    ControlSend, ahk_parent, ^{LEFT} ; Previous
    return
    #.::
    IfWinExist, ahk_class iTunes
    ControlSend, ahk_parent, ^{RIGHT} ; Next
    return


  4. Run/double-click on AutoHotkey.ahk. This will start up AutoHotkey with the script running.
  5. Copy the Start Menu shortcut to AutoHotkey to the Startup folder in the Start Menu so that AutoHotkey automatically runs on startup. AutoHotkey will automatically open and run AutoHotkey.ahk in My Documents when it runs.
  6. If you don't want the AutoHotkey system tray icon to be shown, add a new line to the start of AutoHotkey.ahk containing "#NoTrayIcon" (without the quotes).
The AutoHotkey script configures the following global shortcut keys (note that iTunes must be running first!):
  • Play/Pause: Win + / (slash)
  • Previous Track: Win + , (comma)
  • Next Track: Win + . (period)
Feel free to tweak the script yourself to configure your own keys. AutoHotkey is really fun and easy to learn and the documentation contains everything you need to know. Also, if you use a different media player for your music, feel free to contact me or leave a comment so we can come up with an AutoHotkey hack for you!

Labels: , , ,


About me



Mark Punzalan
a.k.a. "Punzki"
Location: Redmond, WA
Occupation: Softie

Current tag-line:
I'm alive!
Now reading:
The Bible (really!)
Latest obsession:
NBA playoffs (via streaming)

Around the web:
punzki @ punzki.com
punzki @ Blogger
punzki @ del.icio.us
punzki @ LinkedIn
punzki @ Friendster
punzki @ Bloglines
punzki @ YouTube
punzki @ Multiply

Email me: punzki@gmail.com

Search

RSS feed



What is RSS?

AdSense


Et cetera




Locations of visitors to this page


Pinoy Top Blogs
Fantasy Sports Live!
Firefox 2

Creative Commons License
This work is licensed under a Creative Commons License.

Powered by Blogger
and Blogger Templates