Apple Script Editor not working
I've been trying to run a script that was given me by a developer to fix an issue with his software. When I open Script Editor and hit the Play arrow nothing happens.
iMac 27″ 5K, macOS 11.3
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
I've been trying to run a script that was given me by a developer to fix an issue with his software. When I open Script Editor and hit the Play arrow nothing happens.
iMac 27″ 5K, macOS 11.3
Right. Here's a shot from the developer of what it's supposed to look like after the script has run. The script is supposed to change color, as in your example. But in my case, even if I click the "Show Result" button, I get nada.
Click the hammer icon to compile the script from purple text to the following coloration before you click the run button:
This was a screen capture to avoid the color changes caused by the insert code <> button in this editor, and what I posted previously.
Maybe there was a syntax error trying to run the code, maybe you can check the code and the errors.
Let me see the code by copying the code in your script and paste it in here using the Code Insertion text so it would be neat. Maybe I could spot the errors on the code. Also what does the error say?
Thanks, Calvin. Sure. FYI, the app is Airfoil and I'm trying to get it to show the album and song that are playing in Apple Music. The script is:
tell application "Music"
get name of current track
end tell
I am playing In A Lifetime from the Clannad Anam album in Apple Music on Big Sur 11.4. The AppleScript as written returns the name of that track. Unless you click the outline icon at the bottom of the Script Editor, the code will run but not show you the result.
This code will pop a dialog showing that track name:
use scripting additions
tell application "Music"
display dialog (get name of current track) as text
end tell
Just tried that — clicking the hammer first — and still nothing.
Apple Script Editor not working