dougscripts.com

December 5 2025 - 12:11 pm

Count Selected Tracks in Songs View?

Did I tell you that, evidently, the Music app doesn't show the number of selected tracks in the playlist's Status Bar when the playlist is in Songs View? Yup.

Wait, it doesn't show the Status Bar at all when the playlist is in Songs View. Luckily, no chains can keep me from writing this simple AppleScript:

tell application "Music"

try

set sel to selection

set numberOfSelected to (count of sel)

set s to " tracks"

if numberOfSelected is 1 then set s to " track"

display dialog ((numberOfSelected & s & " selected") as text)

end try

end tell

Comes out like this:

Site contents © 2001 - 2025 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not be interrupting the one who is doing it.