Tahoe broke my AppleScript for Music

I had a simple setup: every day at a specified time, a Calendar event would trigger an AppleScript.

The AppleScript was simple enough: all it did was tell the Music app to play the specified playlist.


set volume 1
tell application "Music"
 activate
 play user playlist "name of playlist"
end tell


The script was working just fine, until I updated to Tahoe.

Now, all it does is play just one song from the entire playlist.

You don't even see any of the other songs in the "Continue Playing" section.


Please help! How do I fix this? What am I missing?

iMac 24″, macOS 26.0

Posted on Oct 6, 2025 7:56 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 12, 2025 2:36 PM

So... I wandered over to Reddit to see if others have been facing a similar issue. And I found someone with a similar issue.

In there, I found out that there is an issue that Apple needs to fix with connecting the Music app and AppleScript. Meanwhile, another user said that the Scripting function works with catalog (library) songs.


I asked Perplexity to help me write an AppleScript with this info, and here's the script I got. Thought I'd share it here, in case someone else needs it.


tell application "Music"
set songList to {¬
"First Song Name", ¬
"Second Song Name", ¬
"Third Song Name", ¬
"Fourth Song Name", ¬
"Fifth Song Name", ¬
"Sixth Song Name"}
repeat with aSong in songList
play (first track of playlist "Library" whose name is aSong)
delay 5 -- Wait a few seconds for the command to register
-- Wait until the song finishes before playing the next one
repeat while player state is playing
delay 1
end repeat
end repeat
end tell


Worked like a charm! ✨

This new script will certainly help tide things over till Apple fixes this issue.


Thank you all, for your inputs and insights. 🙏 I really appreciate it.

10 replies
Question marked as Top-ranking reply

Oct 12, 2025 2:36 PM in response to MacFanGurl

So... I wandered over to Reddit to see if others have been facing a similar issue. And I found someone with a similar issue.

In there, I found out that there is an issue that Apple needs to fix with connecting the Music app and AppleScript. Meanwhile, another user said that the Scripting function works with catalog (library) songs.


I asked Perplexity to help me write an AppleScript with this info, and here's the script I got. Thought I'd share it here, in case someone else needs it.


tell application "Music"
set songList to {¬
"First Song Name", ¬
"Second Song Name", ¬
"Third Song Name", ¬
"Fourth Song Name", ¬
"Fifth Song Name", ¬
"Sixth Song Name"}
repeat with aSong in songList
play (first track of playlist "Library" whose name is aSong)
delay 5 -- Wait a few seconds for the command to register
-- Wait until the song finishes before playing the next one
repeat while player state is playing
delay 1
end repeat
end repeat
end tell


Worked like a charm! ✨

This new script will certainly help tide things over till Apple fixes this issue.


Thank you all, for your inputs and insights. 🙏 I really appreciate it.

Nov 5, 2025 8:33 AM in response to MacFanGurl

I had the same problem. Simple scripts to select a Playlist and then start playing that playlist result in only playing the first song. It also causes some weird lag in actually playing the music on occasion. This is the code I used that will select the playlist and then start playing it.


tell application "Music"

try

set thePlaylist to playlist "PlaylistName"

end try

play thePlaylist

end tell

Oct 7, 2025 11:23 AM in response to turingtest2

Hi,

Thank you for testing this out, and for replying.

Yes, the playlist works normally when I click on either play or shuffle when I do this manually.

However, when I use this script, it ends up playing just one track and then stops. This happens with all the playlists. And yes, the tracks are all checked.

I even tried to fiddle around with the Automation feature, now within the Shortcuts app on my iMac. Nothing seems to work.

I really don't know what I'm doing wrong here.

Is there any way to test or check if something could be amiss?

Nov 5, 2025 1:39 PM in response to MacFanGurl

I happen to have a playlist named Internet Songs. In it, I dragged and dropped the .pls file from the radio station website so the playlist looks like this:


Note that Highlander Radio is the third item in this song list. The following AppleScript gets a list of all of these and their URLs and then chooses item 3 (Highland Radio) which plays continuously. I do not subscribe to any of these Internet radio stations.

use scripting additions

tell application "Music"
	activate
	set theCelticChannels to (every track of playlist "Internet Songs")
	-- play Highlander Radio which is the third entry in this playlist
	-- Site: https://tunein.com/radio/Highlander-Radio-s165851/
	-- Apple Music location: http://51.161.115.200:8094/listen.pls?sid=1
	play (open location of item 3 of theCelticChannels)
end tell
return


Tested: Tahoe 26.1



Tahoe broke my AppleScript for Music

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.