<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AppleScript completely broken in Desktop (Mac)</title>
    <link>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5530329#M550429</link>
    <description>&lt;P&gt;So open dictionary didn't work. I could choose Open Dictionary, select Spotify, then click Choose, and literally nothing would happen (other than the window closing). The dictionary for Spotify would NOT pop up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your alternate script didn't work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then I dug in and found the underlying AppleScript definition file in Spotify, and strangely the simple act of directly opening it in Script Editor fixed it?!? I did the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Right-click on Spotify.app and choose "Show Package Contents".&lt;/LI&gt;&lt;LI&gt;Drill down to Contents/Resources/&lt;/LI&gt;&lt;LI&gt;Choose "Open" in Script Editor&lt;/LI&gt;&lt;LI&gt;Drag&amp;nbsp;&lt;SPAN class=""&gt;Spotify.sdef into the open dialog, and click Open&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class=""&gt;That opened the dictionary, and then everything worked after that. It seems like my computer somehow is failing to load the Spotify script definitions, but once I force it, it works?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do it quicker, you could also do this from Terminal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="andale mono,times" size="4"&gt;&lt;SPAN class=""&gt;open -a /System/Applications/Utilities/Script\ Editor.app /Applications/Spotify.app/Contents/Resources/Spotify.sdef&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have a workaround now, but I still have no idea what the root cause is, or even whether it's Spotify's fault or macOS's fault, or something else.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 18:34:47 GMT</pubDate>
    <dc:creator>ToastyKen</dc:creator>
    <dc:date>2023-03-29T18:34:47Z</dc:date>
    <item>
      <title>AppleScript completely broken</title>
      <link>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5529759#M550413</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;MacBook Pro 16-inch 2021&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;macOS Ventura&amp;nbsp;13.2.1 (22D68)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;AppleScript seems completely broken. I can't even load the dictionary in AppleScript Editor, and this basic script doesn't work:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;tell&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;I&gt;application&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt; "Spotify"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN class=""&gt;&amp;nbsp; play&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT color="#000000"&gt;&lt;SPAN class=""&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;end&lt;/STRONG&gt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;tell&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;I get:&lt;/FONT&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;error&lt;/STRONG&gt; "The variable play is not defined." &lt;/SPAN&gt;&lt;SPAN class=""&gt;number&lt;/SPAN&gt;&lt;SPAN class=""&gt; -2753 &lt;/SPAN&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt;&lt;SPAN class=""&gt; "play"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 23:19:21 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5529759#M550413</guid>
      <dc:creator>ToastyKen</dc:creator>
      <dc:date>2023-03-28T23:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: AppleScript completely broken</title>
      <link>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5529768#M550416</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Paw-some to see you ToastyKen!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm sorry to hear that you're having trouble with AppleScript.&lt;/P&gt;&lt;P&gt;Regarding the issue you mentioned, the error message you're receiving suggests that the "play" command is not recognized by the Spotify application, and therefore cannot be executed by AppleScript.&lt;/P&gt;&lt;P&gt;One possible solution is to check the Spotify dictionary to see if the "play" command is available. To do this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open AppleScript Editor.&lt;/LI&gt;&lt;LI&gt;Click on "File" in the menu bar, and select "Open Dictionary".&lt;/LI&gt;&lt;LI&gt;In the "Open Dictionary" window, select "Spotify" from the list of applications, and click "Open".&lt;/LI&gt;&lt;LI&gt;This should open the Spotify dictionary in AppleScript Editor. Look for the "play" command in the dictionary to confirm whether it is supported.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If the "play" command is not available in the dictionary, you may need to use a different command or approach to achieve the desired functionality.&lt;/P&gt;&lt;P&gt;Also if the "play" command is available, you can try modifying your script to explicitly reference the application's dictionary by using the "using terms from" block. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;using terms from application "Spotify"
    play
end using terms from&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should ensure that the "play" command is recognized by the Spotify application when the script is executed.&lt;/P&gt;&lt;P&gt;I hope this helps!&amp;nbsp;&lt;SPAN&gt;Just a pup-date on your situation will do, thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Prague the Dog&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 23:38:18 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5529768#M550416</guid>
      <dc:creator>Prague</dc:creator>
      <dc:date>2023-03-28T23:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: AppleScript completely broken</title>
      <link>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5530329#M550429</link>
      <description>&lt;P&gt;So open dictionary didn't work. I could choose Open Dictionary, select Spotify, then click Choose, and literally nothing would happen (other than the window closing). The dictionary for Spotify would NOT pop up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your alternate script didn't work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then I dug in and found the underlying AppleScript definition file in Spotify, and strangely the simple act of directly opening it in Script Editor fixed it?!? I did the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Right-click on Spotify.app and choose "Show Package Contents".&lt;/LI&gt;&lt;LI&gt;Drill down to Contents/Resources/&lt;/LI&gt;&lt;LI&gt;Choose "Open" in Script Editor&lt;/LI&gt;&lt;LI&gt;Drag&amp;nbsp;&lt;SPAN class=""&gt;Spotify.sdef into the open dialog, and click Open&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class=""&gt;That opened the dictionary, and then everything worked after that. It seems like my computer somehow is failing to load the Spotify script definitions, but once I force it, it works?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do it quicker, you could also do this from Terminal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="andale mono,times" size="4"&gt;&lt;SPAN class=""&gt;open -a /System/Applications/Utilities/Script\ Editor.app /Applications/Spotify.app/Contents/Resources/Spotify.sdef&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have a workaround now, but I still have no idea what the root cause is, or even whether it's Spotify's fault or macOS's fault, or something else.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 18:34:47 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Desktop-Mac/AppleScript-completely-broken/m-p/5530329#M550429</guid>
      <dc:creator>ToastyKen</dc:creator>
      <dc:date>2023-03-29T18:34:47Z</dc:date>
    </item>
  </channel>
</rss>

