Quicksilver Trigger: “Show Current Track” in iTunes
January 8th, 2009
A while back I throw together this AppleScript to trigger Quicksilver to not only go to iTunes, but to automatically focus on the current track. (Note: When iTunes is already the front window, the command to do this is ⌘L.
Features
- Brings iTunes to the front if it isn’t already the front window
- Highlights the track that is currently playing (if one is playing)
- If iTunes is already the front window, this script will hide the window (similar to using ⌘H
Steps
- Make sure Quicksilver is installed.
- Copy the code below into a text file.
- Save that file in a directory (preferably somewhere in your home directory). Mine is saved at /Users/auzigog/Apple Scripts/showplayingtrack.scpt.
- Open quicksilver by pressing your hot key (likely ⌘L) and press the arrow in the top right to open the menu. Select Triggers
- Press the + button to add a new hot key.
- Into the first box, type ~/Apple Scripts/showplayingtrack.scpt (modify this if you saved it somewhere else).
- Press save
- Assign a hot key
- Select the item you just added and double-click the area that says “none”.
- Put your curson in the “Hot Key” box and press the keys you want to use to trigger this script. I chose ^⌘L (Ctrl + Apple + L) to mimic the built in iTunes command
You’re done!
That’s it! Leave a comment if you find this helpful!
The code
on run tell application "iTunes" if frontmost is true then tell application "System Events" set app_name to name of the first process whose frontmost is true set visible of process app_name to false end tell else set frontmost to true if player state is playing then reveal current track end if end if end tell end run



















