Created
April 25, 2015 05:02
-
-
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
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
# 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