First of all, thanks to Brittanie, Michael, and everyone else who has helped whip this thing out. I only wish I had an apple so I could join in the fun.
Secondly, I wanted to fully explain what my VBScript does so that you make sure to cover everything in the Applescript. Here is some psuedo code
* Get a playlist name from the user.
* Get the interval pattern of the format h:m:s,h:m:s,...
* For each interval in the pattern
* Convert each interval to it's total number of seconds
* If that process throws an error, alert the user that their pattern is bad.
* Add the interval, as seconds, to a new array.
* End For
* Open iTunes and look for the given playlist, alert the user if the playlist could not be found.
* Get the transitional track (some track that plays before a break, less than a second long--in this case "Ding.mp3")
* Create a new playlist who's name is "*" + Original Playlist Name
* For each track in the playlist:
* Reset the start and finish to their original values
* Subtract the track's duration from the time left
* If that result is <= 0
* Set the track's finish time to be the difference.
* Get the next interval (if at the end, start over with the first interval)
* Set the Add Transtion Flag = True
* End If
* Add the track to the new runners playlist
* If Add Transition Flag = True, add the transition track to the new playlist.
* End For
* Alert "Finished".
And for the undo script:
* Get the original playlist name from the user
* Open iTunes and look for that playlist.
* If it could not be found, alert the user.
* For each track in the playlist
* Reset the start and finish to their original values
* End For
* Get the runner's playlist ("*" + Original playlist name).
* If it could not be found, alert the user.
* Delete the playlist.
* alert "Finished"<br>
Windows XP Pro