Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applescript for playing each track for a second?

Well, does anyone know about a script that would play each track in my iTunes music library for just a second and then go to the next one?

There are a few details, though, that might make things a bit more complex:

first of all, occasionally, some of the tags might change, as soon as the track is beginning to play, e.g., the artist might change

(I guess this has to do with iTunes Match - I'm seeing a few funny behaviours since I've switched on iTunes Match).

Second, occasionally, iTunes will complain that "The song ... could not be used because the original file could not be found. Would you like to locate it?"

In those cases, the script should "press" 'cancel'.


Actually, the latter is the main reason why I would like to have this script:

a number of tracks don't seem to be locally in my iTunes library any more, but they are still in the list, and still in the iCloud.

In order to find those tracks more easily, I would like to have this script.

Ideally, the script would then also click on the iCloud symbol with the downward arrow.


(I have tried the script from Doug's scripts at http://dougscripts.com/ that finds dead tracks, but I would still have to manually go through all tracks

and do a lot of clicking, double-clicking, etc.)


Any ideas , pointers, or applescript pieces would be most appreciated.

(I am a very very casual applescript programmer, but I feel comfortable with a few other languages, such as C++)

MacBook Pro (Retina, 15-inch, Early 2013), OS X Mavericks (10.9.2)

Posted on Dec 17, 2014 1:58 PM

Reply
2 replies

Dec 18, 2014 9:25 PM in response to GabrielZ

It sounds to me that you're over-complicating things a lot.


From your description it sounds like the goal is to identify the missing tracks. Is that the case? If so it sounds to me (no pun intended) that you're far better off cross referencing the library and corresponding files, and not bothering to play the tracks at all. It should be easy enough to get a list of tracks who's files do/do not exist, from which you can take whatever actions you like.


In fact, it's even easier - tracks that exist on disk are referred to as file tracks and ones in iCloud are shared tracks, so you can simply:


tell application "iTunes"

get every shared track

end tell


So now you have a list of all the shared tracks in iCloud.


The tricky part, though, is in downloading the shared/iCloud tracks. There doesn't seem to be an easy/obvious way to do that.... I'll keep digging.

Dec 19, 2014 3:37 PM in response to Camelot

Thanks a lot for your response!


From your description it sounds like the goal is to identify the missing tracks. Is that the case?


That is correct - sorry for being too complicated.


In fact, it's even easier - tracks that exist on disk are referred to as file tracks and ones in iCloud are shared tracks, so you can simply:


tell application "iTunes"

get every shared track

end tell


Sounds very good. I tried it, but I didn't see any results:



User uploaded file

Applescript for playing each track for a second?

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