magnify
formats

Global Hotkey to Instantly Play Music in iTunes

Published on August 25, 2011

I’m usually too distracted by other work to remember to kick-off some music in the background.  Usually because it’d mean launching iTunes, waiting for it to load, finding a playlist to start, and kicking it off.  So here’s a single global hotkey to instantly load iTunes and start playing music.  Here’s how:

Hotkey: Win+Alt+P

  1. Get the Tools
    Have a master AutoHotkey hotkey file and set PowerShell to autoload this little iTunes.ps1 library on PowerShell startup.  With these two it makes it real easy to assign hotkeys to various iTunes commands.
  2. Create a “PlayHotkey” Playlist in iTunes
    Create an iTunes a playlist to be kicked off when the hotkey is pressed. I’ve got mine set to shuffle unplayed tracks.
  3. Add AutoHotkey Line
    What enables this line to be so simple is that there is a itPlaylist function in the above iTunes.ps1 file that gets auto loaded as part of step 1.
    ; Play Music NOW with Win+Alt+P
    #!p:: Run powershell -command (itPlaylist('PlayHotkey')).PlayFirstTrack(),,Hide

Full script w other media hotkeys: MediaKeys.ahk

p.s. As an alternative, we could just launch Pandora instead:
#!p:: Run http://pandora.com

Related posts:

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
1 Comment  comments 

One Response

  1. [...] posts:Global Hotkey to Rate an iTunes TrackGlobal Hotkey to Instantly Play Music in iTunesMore posts on iTunes, Global Hotkeys, or PowerShell   Tags: autohotkey, hotkey, [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>