This is a script that for iTunes for Windows that will programmatically rate the current track.
You can bind it to a shortcut and set a Shortcut Key such as Ctrl+Alt+1.
You need to pass in the number of half stars (yes, iTunes supports ½ stars).
Download
Download iTunesRateCurrentTrack.vbs.
If you have problems with the .vbs file, download and rename iTunesRateCurrentTrack.txt (right-click, save-as).
Notes
- Comments, suggestions, corrections are welcome.
- If you find the script useful, please click on an ad.
Usage
##### iTunes Rate Current Track Script ##### Usage: iTunesRateCurrentTrack rating [-q] rating Number of 1/2 stars. Valid values: Integers from 1 to 10inclusive. -q Quiet mode. Don't display any non-usage error messages. Examples: iTunesRateCurrentTrack 1 iTunesRateCurrentTrack 7 -q

On the mac, at least, iTunes supports 1-100 ratings, and each star is actually 20. There’s just no interface to let you set 23 point ratings.
Anonymous: Yep. It’s the same on Windows. After some experimenting I’ve determined that the interface will display 1/2 stars, but not other fractions.
On Windows are there are any apps like Synergy or Sizzling Keys ( OS X ) that assign universal hotkeys to rate the currently playing song. I’ve used synergy for years for this.
Paul: Oddly, I didn’t find either of those when I searched (have I mentioned I suck at Google searches?) I found iTunesKeys but found it was buggy. The benefit of the scripting solution is that it doesn’t require any 3rd party apps.
See and I would say that the benefit of third-party apps is that don’t require me to write any scripts. :)
I have actually written/adapted Applescripts that do auto-rating of songs in iTunes based on whether you let a song play through or skip it. That’s my preferred method of using ratings as then songs float up and down on their won based on how often I let them play. Unfortunately the latest versions of iTunes have broken the scripts and I haven’t gotten around to fixing them.
Oh and to find OS X apps try MacUpdate.com or VersionTracker.com rather than Google.
Paul: I can’t do the auto-rating of songs for 2 reasons:
* At work, I frequently forget to pause iTunes when I go to meetings.
* At home, I frequently need to skip over songs that the rest of the family doesn’t like.
Besides… I like writing random pieces of code… it’s fun. Thank you for the pointer to the OSX apps sites.