Getting all selected tracks in Music app

I am trying to get every track that has been manually selected in Music to make changes to them. I seem to be missing something either deep or obvious. The following test doesn’t return or change anything:

Blockquote tell application “Music”
set TrkLst to every track of (get selection)

repeat with aTrack in TrkLst
	set comment of aTrack to "%%"
	
end repeat

end tell

The following worked on my Sequoia computer. It returned every selected item and the comments of the selected items were changed.

tell application "Music"
	set TrkLst to selection
	repeat with aTrack in TrkLst
		set comment of aTrack to "%%"
	end repeat
end tell

Thank you peavine!
It also worked perfectly on Mac Catalina. I just missed it.

1 Like

It appears he wants to select tracks that had been previously manually selected, [if manually selected, then choose, else skip]. You brainiacs are going to have to solve this one if I understand the problem correctly.