--before running, clear out any greyed-out, un-downloaded podcasts, --or the script will crash with a file permission error. tell application "iTunes" -- update podcasts updateAllPodcasts display dialog "I am too stupid to know when the podcasts have updated. Please tell me." buttons {"They're done"} default button "They're done" -- delete the old list and make a new one try set myShuffleList to the playlist "Shuffle" delete tracks in myShuffleList end try set PodList to the playlist "Podcasts" --next line is IMPORTANT! Without it, podcasts won't load! set shufflable of (every track of PodList) to true set MusicList to the playlist "Workout Music" --get news podcasts for morning commute duplicate (every track of PodList whose album contains "NPR" or album contains "KCRW" and played count is 0) to myShuffleList --etc. --get music for cardio --first, shuffle it set shuffle of MusicList to true set shuffle of MusicList to false set shuffle of MusicList to true --then grab 10 random songs repeat with i from 1 to 10 tell MusicList duplicate track i to myShuffleList end tell end repeat --get podcasts for rest of workout duplicate (every track of PodList whose album contains "Four Guys Walk Into a Bar" or album contains "Yog-Sothoth" or album contains "Biddycast" and played count is 0) to myShuffleList --get podcasts for commute home duplicate (every track of PodList whose album contains "43 Folders" or album contains "MacBreak" or album contains "TECH" and played count is 0) to myShuffleList --etc. display dialog "OK, the new list is ready. Go to the Shuffle, re-select the Shuffle list, and click Autofill." buttons {"OK"} default button "OK" end tell