I'm working on a script to manage my "queue" playlist in iTunes and wanted an easy and fast way to quickly delete all songs in that playlist.
Applescript seemed the best option and I created a little script executable with a keyboard shortcut. However it doesn't seem to work.
This is the relevant part:
tell application "iTunes" repeat with t in tracks of playlist "queue" tell playlist "queue" to delete t end repeat end tell
The problem is that not all the tracks are deleted, only a part of them. Executing the script multiple times, eventually, deletes all the tracks in the playlist.