1. on run {input, parameters}
  2. tell application "iTunes"
  3. set randomPlaylist to item 1 of (playlists whose name is "Random")
  4. delete tracks of randomPlaylist
  5. repeat while (count of tracks of randomPlaylist) is 0
  6. delay 0.2
  7. end repeat
  8. return location of tracks of randomPlaylist
  9. end tell
  10. end run

update random smart playlist