'iTunes: Copy rating, play count, and last played date. 'v1.0 'by Kaleb Grace - http://kalebgrace.com/code/itunes/ Dim title, iTunesApp, selectedTracks, selectedTrackCount, answer, file title = "iTunes: Copy Rating/Plays" Set iTunesApp = WScript.CreateObject("iTunes.Application") Set selectedTracks = iTunesApp.SelectedTracks selectedTrackCount = 0 On Error Resume Next selectedTrackCount = selectedTracks.Count If selectedTrackCount = 0 Then MsgBox "There are currently no tracks selected." _ & vbCrLf & vbCrLf _ & "Click OK, select some tracks, and re-run the script.", vbCritical, title WScript.Quit End If answer = MsgBox("STOP! Make sure you have selected the correct tracks in iTunes" _ & " on which you wish to perform this operation. Also, sorting beforehand" _ & " by manual order will make for the best display while working." _ & vbCrLf & vbCrLf _ & "There are currently " & CStr(selectedTrackCount) & " tracks selected." _ & " Click OK to proceed.", vbOKCancel + vbExclamation + vbDefaultButton2, title) If answer <> vbOK Then WScript.Quit Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("Rating & Plays - TEMP.txt", 2, true) For Each IITTrack In selectedTracks file.WriteLine(IITTrack.Rating & "|" & IITTrack.PlayedCount & "|" & IITTrack.PlayedDate) Next file.Close Set file = Nothing