Created
July 28, 2011 20:16
-
-
Save gdiggs/1112446 to your computer and use it in GitHub Desktop.
Get current track and link in Spotify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Spotify" | |
set track_name to name of current track | |
set track_artist to artist of current track | |
set track_album to album of current track | |
set track_id to id of current track | |
end tell | |
set AppleScript's text item delimiters to ":" | |
set track_id to third text item of track_id | |
set AppleScript's text item delimiters to {""} | |
set message to "'" & track_name & "' by " & track_artist & " on '" & track_album & "' - http://open.spotify.com/track/" & track_id | |
return message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment