$puts(rating,$if(%rating%,%rating%,0))
$button(0,0,0,0,12,13,rating\rating$get(rating).png,rating\rating1.png,1,)
$button(0,0,12,0,12,13,rating\rating$get(rating).png,rating\rating2.png,2,)
$button(0,0,24,0,12,13,rating\rating$get(rating).png,rating\rating3.png,3,)
$button(0,0,36,0,12,13,rating\rating$get(rating).png,rating\rating4.png,4,)
$button(0,0,48,0,12,13,rating\rating$get(rating).png,rating\rating5.png,5,)
Images goes in /rating in foobar2000 dir.
This relies on Playback Statistics to store (or sync) rating. Change the last digit to i.e. TAG:SET:RATING:1 if you want to write directly to tags.
Can you put a preview of the buttons please?
It's pretty easy, you click the "rating.zip" and open one of the images.