Need help to fix up an iTunes (now called Music) script for macOS

one of the guides has this script for iTunes but it no longer works on the latest mac osx
the error i get is a syntax error it expects the end of the line were selection is any clue how to fix it? my scripting know how is poor

https://beta.musicbrainz.org/doc/iTunes_Guide

tell application “iTunes”
refresh selection
end tell

found out what was wrong it needs to be

tell application “Music”
refresh selection
end tell

3 Likes