I’m trying to write AppleScript that will find which tracks Music will play after the current track, that is, the upcoming tracks.
I can easily find all tracks of the current playlist, look for the current track in that list of tracks, and grab the following tracks. But this fails when a track appears more than once in the current playlist, because I don’t know which instance of that track is the one being played! Is there some way of figuring this out?
(My current code compares track names, not tracks themselves, so perhaps this is what I’m doing wrong. If a track appears multiple times in a playlist, are the instances somehow different?)