Home > Computers, Featured, Guides, Programming > Quicksilver Trigger: “Show Current Track” in iTunes

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

  1. Make sure Quicksilver is installed.
  2. Copy the code below into a text file.
  3. Save that file in a directory (preferably somewhere in your home directory). Mine is saved at /Users/auzigog/Apple Scripts/showplayingtrack.scpt.
  4. Open quicksilver by pressing your hot key (likely ⌘L) and press the arrow in the top right to open the menu. Select Triggers
  5. Press the + button to add a new hot key.
    1. Into the first box, type ~/Apple Scripts/showplayingtrack.scpt (modify this if you saved it somewhere else).
    2. Press save
  6. Assign a hot key
    1. Select the item you just added and double-click the area that says “none”.
    2. 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
Share and Enjoy:
  • Facebook
  • E-mail this story to a friend!
  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon
  • TwitThis
  • Google

Computers, Featured, Guides, Programming , , , ,

  1. No comments yet.
  1. No trackbacks yet.