Skip to content

Instantly share code, notes, and snippets.

@WilDoane
Created April 25, 2015 05:02
Show Gist options
  • Save WilDoane/116e8bc6505cd84e9d44 to your computer and use it in GitHub Desktop.
Save WilDoane/116e8bc6505cd84e9d44 to your computer and use it in GitHub Desktop.
Generates output of track info from a Spotify playlist using the Spotify app and the Results window in Apple's Script Editor
# manually find the number of tracks in spotify and enter it here
set n_tracks to 153
tell application "Spotify"
play track "paste:spotify:playlist:uri:here"
delay 2
end tell
on getCurrentlyPlayingTrack()
tell application "Spotify"
set curArtist to artist of current track as string
set curTrack to name of current track as string
set curAlbum to album of current track as string
set curId to id of current track as string
set curDuration to duration of current track as string
#set curCount to played count of current track as string
#set curPopularity to popularity of current track as string
return curArtist & " - " & curTrack
end tell
end getCurrentlyPlayingTrack
repeat n_tracks times
set currentlyPlayingTrack to getCurrentlyPlayingTrack()
tell application "Spotify"
next track
end tell
delay 1
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment