Maually add Play Count to a song on iTunes
5 02 2008I’ve noticed a lot of Applescripts floating around for the Mac version of iTunes and I thought I would post on how to edit the play count on the Windows version of iTunes. Download the file from the link and rename it to “play count.wsf.” . To execute it have iTunes open and the song or songs selected that you want to edit the play count, double click on the script in Windows Explorer. It will prompt you for a number (note: this will add to the play count. It requires some math and thinking but it shouldn’t be too hard.
If you want to subtract from the current play count, just add a “-” sign before the number.) and then you just press enter. It will display a dialog box saying that it has successfully added the play count to your song(s). Enjoy!
Note: to download the file right click and select “save target as”
http://soccerislife8-tech-update.googlegroups.com/web/Play+Count.txt










Thanks a lot. I’ve been searching for hours and it seems the only info for this doing this is 2 years old.
Also you can change parts of the script however you like to fit your specific needs.
I followed your instructions but when I run the script, an error pops up saying something like “unrecognized marker in Line 2, character 2″. Does this script work with iTunes 7? maybe Im doing something wrong. Any help?
Ok, its me again. I should let you know that if you right click on the download link then choose “Save As” to get the script, the file that downloads doesn’t work. Gives me the error I mentioned above (unrecognized marker, line 2). But then I left clicked on the download link and got the script on my screen, copy/pasted it to notepad, saved it, ran it, and it worked like a charm.
So, in short, the file you get by right clicking and choosing “Save as” is not the one that works somehow.
Thank you for a great script tho. Awesome work.
Thank you for the information. Glad you were able to figure it out on your own.
I tried to copy and pasted the actual script itself onto note pad but I still couldn’t get it, the “Error” message kept coming up
This is the error message that comes up after I try to run the file:
Script: L:\Play+Count.wsf
Line: 2
Char: 2
Error: Unrecognized markup
Code: 8004000D
Source: Windows Script Host
I had the same problem as you Penny. I done as directed by Anonymous but was still getting that error. I think it is a problem with the way Internet Explorer was opening it.
I fixed it by copy and pasting it as before and saving it as playcount.wsf . Then open it up again with notepad and delete every space and “-” before the “<” symbol in the script. This seemed to do the job for me.
Great script mate, really helpful.
cheers dude, this was bugging me for ages, good bit of script!
Thanks! Have been trying to edit the XML file directly but to no avail. This script together with the tips above works a treat.
Dude, you’re awesome!
I don’t think Apple really understands how people use iTunes,
so they don’t have ways to edit information like PlayCount to make the library more personalizable.
Oh well…
By the way, I was trying to edit the script such that the number entered becomes the actual PlayCount (no more addition).
Im not familiar with scripting so, is this correct:
currentTrack.PlayedCount = result