La prima cosa è che il valore del rating viene semplicemente memorizzato come "rating". Ma iTunes memorizza la valutazione a stelle come valore compreso tra 0 e 100, quindi è necessario convertire da quel valore al numero di stelle. 
 Potrebbe esserci un modo più intelligente per farlo, ma questo codice sembra funzionare. 
tell application "iTunes"
    set theTrack to (item 1 of (get selection))
    set theRating to rating of theTrack
    if theRating = 100 then
        set comment of theTrack to "5 Star"
    else if theRating ≥ 80 then
        set comment of theTrack to "4 Star"
    else if theRating ≥ 60 then
        set comment of theTrack to "3 Star"
    else if theRating ≥ 40 then
        set comment of theTrack to "2 Star"
    else if theRating ≥ 20 then
        set comment of theTrack to "1 Star"
    else if theRating = 0 then
        set comment of theTrack to "0 Star"
    end if
end tell