Categories: Misc / DotNet / Java / Coder / Linux / PHP Ask - La ask - La Answer

set play count?

is there a script for windows that will set the play count on itunes 7.0? This used to be my old script but it doesn't work anymore:

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

...when I try it, then it just gives me a windows script error message.
[805 byte] By [snorida45x] at [2007-11-11 16:54:16]
# 1 Re: set play count?
Maybe Doug's "New Play Count" script will do?
http://www.dougscripts.com/itunes/scripts/ss.php?sp=newplayedcount
Essin at 2007-11-15 17:23:25 >
# 2 Re: set play count?
that doesn't work with windows...is there a windows script?
snorida45x at 2007-11-15 17:24:36 >
# 3 Re: set play count?
Ooops... I was thinking, this being the Applescript forum and all...
Doug can help nonetheless.
http://www.dougscripts.com/itunes/itinfo/windowshelp.php
Essin at 2007-11-15 17:25:34 >
# 4 Re: set play count?
lol...dude I don't know where to begin, maybe more info on that? thanks.
snorida45x at 2007-11-15 17:26:29 >
# 5 Re: set play count?
Did you try the second script in this thread, it sets play count for selected songs (not just the one playing).

It works for me.

http://forums.ilounge.com/showthread.php?t=40327&highlight=playcount+script+selected
Argon at 2007-11-15 17:27:38 >
# 6 Re: set play count?
Or you could try using beaTunes ( http://www.beatunes.com). Unfortunately, it's shareware, but I was lucky and was given a free license from the Apple Gazette blog. I highly recommend it though for digging down deeper into your iTunes library and messing around with things.
onlycodered at 2007-11-15 17:28:38 >
# 7 Re: set play count?
Did you try the second script in this thread, it sets play count for selected songs (not just the one playing).

It works for me.

http://forums.ilounge.com/showthread.php?t=40327&highlight=playcount+script+selected

when I try and use that, this is the error that windows gives me: http://img156.imageshack.us/img156/1145/ssjf1.jpg

is there a fix for that?
snorida45x at 2007-11-15 17:29:41 >
[an error occurred while processing this directive]
[an error occurred while processing this directive]