Skip to content

Instantly share code, notes, and snippets.

@cheeplusplus
Created October 16, 2013 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cheeplusplus/7002922 to your computer and use it in GitHub Desktop.
Save cheeplusplus/7002922 to your computer and use it in GitHub Desktop.
Sets the play count of the currently playing track in iTunes (Windows). http://joe.siegler.net/2010/11/how-to-change-the-play-count-number-in-itunes/
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment