Skip to content

Instantly share code, notes, and snippets.

@ChrisLTD
Created February 9, 2014 19:40
Show Gist options
  • Save ChrisLTD/8904834 to your computer and use it in GitHub Desktop.
Save ChrisLTD/8904834 to your computer and use it in GitHub Desktop.
Pull track and album from iTunes
tell application "iTunes"
if player state is playing then
set trackName to (get name of current track)
set trackArtist to (get artist of current track)
else
return
end if
end tell
("Listening to " & quote & trackName & quote & " by " & trackArtist & " ♫") as text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment