Skip to content

Instantly share code, notes, and snippets.

@PatMurrayDEV
Last active June 29, 2020 07:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatMurrayDEV/18448ff57165ac72487c37e9b173d36f to your computer and use it in GitHub Desktop.
Save PatMurrayDEV/18448ff57165ac72487c37e9b173d36f to your computer and use it in GitHub Desktop.
Manually update play count for songs in iTunes

Update iTunes Play Count

Save the AppleScript file to /Users/{username}/Library/iTunes/Scripts as Change iTunes Count.scpt.

In iTunes a new menu item, the script icon, will appear. With one or more song selected, click Change iTunes Count and type in the updated play count for each song.

This still a very manual process, which could definitely be scripted to be faster. However, for fear of losing all plays; I'm using this one song at a time (it does support loopin through multiple songs though).

tell application "iTunes"
set sel to selection
repeat with track in sel
set trackname to the name of track
set dialog_answers to display dialog "Enter a new play count for " & trackname & ":" default answer ""
set newcount to text returned of dialog_answers as integer
if button returned of dialog_answers is "OK" then
set played count of t to newcount
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment