On Jan 28, 2009, at 7:51 PM, Michelle Steiner wrote:
I stripped out the parts of the code that are irrelevant to the problem. Here is what is left:
Track 11 should not be there, and track 12 should. The name of track 11 is Top 25 Most Played, which is in the exclusion list.
What is going wrong?
It worked for me. See what results you get with this verision run with the log open, it might help spot where the problem lies.
set excludedPlaylists to {"Library", "TV Shows", "Music", "Movies", "Podcasts", "Purchased", "Genius", "Music Videos", "My Top Rated", "Recently Played", "Top 25 Most Played"}
set theList to {}
tell application "iTunes"
repeat with i from 1 to count of user playlists
log i
set playListName to the name of playlist i
set playListIndex to the index of playlist i
if the name of playlist i is not in excludedPlaylists then
copy return to the end of theList
copy i & space & playListIndex & space & playListName to the end of theList
end if
end repeat
end tell
log (items 2 through end of theList as text)