tell application "iTunes" to try activate choose from list (get name of playlists) with prompt "Select the _All-Unrated-Songs_ playlist." set mac_pl to playlist (result as Unicode text) repeat with i in tracks of library playlist 1 of (first source whose kind is iPod) get (tracks of mac_pl whose name = (name of i as Unicode text)) repeat with ii in the result if album of ii = (album of i as Unicode text) then set ii's played count to (played count of i as integer) set ii's rating to (rating of i as integer) -- this may cause an error... --set ii's played date to (played date of i as date) exit repeat end if end repeat end repeat display dialog "Done!" buttons {"OK"} default button 1 giving up after 30 with title "iTunes" with icon 1
on error err_msg number err_num display alert "Error " & err_num message err_msg as warning end try