Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Rate iTunes songs on a wider scale' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Rate iTunes songs on a wider scale
Authored by: DougAdams on Feb 02, '05 11:35:56AM
Here is a script that will display the Rating of the Current Track (or selected track if no track is playing), and also allow you to change it to any number between 0 - 100:
tell application "iTunes"
	if player state is not stopped then
		set thisTrack to current track
	else
		if selection of front window is not {} then
			set thisTrack to item 1 of (selection of front window)
		else
			display dialog "No track is playing or selected." buttons {"Cancel"} default button 1 with icon 2
		end if
	end if
	
end tell

do_rating("", thisTrack)

to do_rating(addenda, thisTrack)
	tell application "iTunes"
		set new_rating to text returned of (display dialog addenda & (thisTrack's name) & " is Rated:" default answer (get thisTrack's rating) default button 2)
		try
			new_rating as integer is greater than or equal to 100
			set thisTrack's rating to new_rating as integer
		on error
			my do_rating(("You must enter a number between 0 - 100..." & return & return), thisTrack)
		end try
	end tell
end do_rating
Save it with Script Editor in your home > Library > iTunes > Scripts folder.

[ Reply to This | # ]
Rate iTunes songs on a wider scale
Authored by: DougAdams on Feb 03, '05 11:41:35AM
This script has been updated here.

[ Reply to This | # ]