Skip to content

Instantly share code, notes, and snippets.

@DanielBlanco
Created June 7, 2017 02:22
Show Gist options
  • Save DanielBlanco/f193ffb0228087d62e0889e258e4f360 to your computer and use it in GitHub Desktop.
Save DanielBlanco/f193ffb0228087d62e0889e258e4f360 to your computer and use it in GitHub Desktop.
Returns the name & artist of the current Spotify track
if application "Spotify" is running then
tell application "Spotify"
set theName to name of the current track
set theArtist to artist of the current track
set theAlbum to album of the current track
set theUrl to spotify url of the current track
try
return "♫ " & theName & " - " & theArtist
on error err
end try
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment