Reputation: 5051
Is it possible to access the song name of the currently playing song in the Spotify Mac app via Applescript? I would like to be able to copy the name of the currently playing song to my clipboard.
If not possible through Applescript how else could I do this?
Upvotes: 0
Views: 815
Reputation: 6102
tell application "Spotify"
set nowplaying to the current track's name
end tell
set the clipboard to nowplaying
Even though set the clipboard
is a Standard Additions command, ordinarily one ought to be able to combine the above into a single line:
tell app "Spotify" to set the clipboard to the current track's name
but this appeared not to work on my system. However, placing the clipboard command outwith the Spotify tell
block works fine.
Upvotes: 0