Manually Set iTunes for Windows Playcount

by Eric on August 29, 2009

Every once and a while I will replace a track in my music library with a better quality one. This little VB script that I wrote allows me to manually set the playcount of a track so that the new one has the same playcount as the old one. Enjoy.

Dim iTunesApp, currTrack, newPlayCount
Dim prompt, title, defaultValue
 
Set iTunesApp = WScript.CreateObject("iTunes.Application")
Set currTrack = iTunesApp.CurrentTrack
 
prompt = "New playcount:"
title = currTrack.Artist & " - " & currTrack.Name
defaultValue = currTrack.PlayedCount
 
newPlayCount = InputBox (prompt, title, defaultValue)
 
If IsNumeric(newPlayCount) Then
  If newPlayCount >= 0 Then
    If Len(newPlayCount) > 0 Then
      currTrack.PlayedCount = newPlayCount
    End If
  End If
End If

Leave a Comment

Previous post:

Next post: