Is is possible for AppleScript to get the currently playing song from the Spotify app?

Reply

Is is possible for AppleScript to get the currently playing song from the Spotify app?

Music Fan

I would love to make applescript that can fetch the current song from the Mac Spotify app and run a google search in my browser for "[song name] lyrics". Is it actually possible to access the currently playing song via an Applescript command? 

 

I know about the Musixmatch app which is good for a lot of songs but I have many tracks that don't have lyrics in their app (often acoustic tracks) or are blocked by the label. I would like to be able to have a shortcut assigned applescript that can search for these lyrics without having to type out the song name in my browser.

 

Also, short of that is there an easy way to copy the [song name] of the song from the app to my clipboard? None of the text is selectable in the desktop app so it seems like I have to manually type out the name of the song each time to find the lyrics which is annoying.

4 Replies
Highlighted

Re: Is is possible for AppleScript to get the currently playing song from the Spotify app?

Newbie

Yes!

 

You can view the applescript dictionary in Script Debugger (or other ways):

 

spotify-as.png

Highlighted

Re: Is is possible for AppleScript to get the currently playing song from the Spotify app?

Casual Listener
Mrc, how to launch Script Debugger in MacOS?
Highlighted

Re: Is is possible for AppleScript to get the currently playing song from the Spotify app?

Visitor
I believe that @MrC_ was referring to this application https://latenightsw.com/
Highlighted

Re: Is is possible for AppleScript to get the currently playing song from the Spotify app?

Music Fan
They broke AppleScript "current track" in recent update (v 1.1.31.703.g256add22) :((( Now it's working randomly...
SUGGESTED POSTS