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
- 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.
- 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.
- 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:
[...] 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, [...]