Apple scripting broken in 1.0.1.988.g8f17a348

Solved!
Reply
23 people liked this

Apple scripting broken in 1.0.1.988.g8f17a348

Music Fan
‎2015-02-16 06:11 PM

Steps to reproduce:

  1. Open AppleScript editor
  2. Paste the following:

    tell application "Spotify"
    	playpause
    end tell
  3. Script -> Run

Expected result:

Spotify toggles playing

 

Actual result:

error "The variable playpause is not defined."

 

Root cause:

Scripting definition file, Spotify.sdef, has been moved to the "applescript" subdirectory, but the path in Info.plist hasn't been updated.

 

Workaround:

 

Patch Spotify.app/Contents/Info.plist with:

51c51
<       <string>Spotify.sdef</string>
---
>       <string>applescript/Spotify.sdef</string>

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Lover
‎2015-03-18 04:08 PM

helped so much thank you!

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Rock Star
‎2015-03-23 07:37 PM

Good news!

 

Apple script support will be coming back in a future update!

 

https://community.spotify.com/t5/Live-Ideas/Bring-back-Applescript-support/idc-p/1068934#M31916

 

"Status changed to: Watch this space


Hey guys, this feature will be in a future Desktop update. We'll update this post here when we have more news. Thanks!"

Matt Suda   Community Rock Star
♫ Music keeps my heart beating ♫

16 Replies

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Fan
‎2015-02-17 06:16 AM
Thanks so much for this. I've really missed Applescript support in Spotify.

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Lover
‎2015-02-17 08:12 AM

I tried this solution... it worked for a few minutes.. and then broke again after reboot...

 

Once I tried to fix it with this suggestion, I had to make the adjustment, then I closed the app.  When I opening it again, this warning displayed.  I clicked allow and now it is good to go again.  

Screen Shot 2015-02-17 at 12.11.11 AM.png
1 person liked this

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Concert VIP
‎2015-03-03 02:00 PM

Thanks for the workaround. It works for all commands, except "play track"

 

Example:

 

tell application "Spotify"
	play track "spotify:track:4JOj52PuNDT1qt8yVosxM5"
end tell

 

This is doing anything (whereas playpause is working as expected for example). Is that the case also for you ?

 

Thanks

1 person liked this

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Festival Fanatic
‎2015-03-11 09:32 PM

I have the same problem with this patch working for all commands except play track

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Concert VIP
‎2015-03-12 02:53 PM

Bump!

 

I need this fixed as I use USBOverdrive on the Mac to configure buttons on my G930.

3 people liked this

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Fan
‎2015-03-12 03:02 PM

Thanks for the workaround.

For me, using Mac and Simplify app to show mini player, it is working with this workaround but I do not get any album art.

Any ideas?

I'm using Spotify Mac 1.0.2.1060

 

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Lover
‎2015-03-12 05:20 PM

Same problem here!

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Lover
‎2015-03-12 05:20 PM
Yup, same problem

Re: Apple scripting broken in 1.0.1.988.g8f17a348

Music Fan
‎2015-03-16 09:26 PM

This is still broken in 1.0.1.160.gc75ebdfd and the patch suggested by chmod666 does not fix the "play track" command.

 

Please, this needs to be fixed asap as third party tools rely on scripting abilities.

SUGGESTED POSTS