Apple Service/Script Neeeded: Copy from browser to iTunes tag

Hoping someone can help me. I’ve been going through the tedious process of tagging my iTunes Jazz collection with the tracks personnel using the “Comments” field. In some cases, I’ve also been using the “Grouping” tag to store the session date and location. In most cases, I can find the data I need on various discograpies on the web, which allows me to copy from my browser and then “Get Info” on a single track or multiple tracks in iTunes and paste the data.

I’m looking to automate this process, but have been unable to find (or edit) a script to do what I want, copy the selected text in the browser and paste it into a field of my choice in iTunes. I did find something on Doug’s Apple Scripts site that is close to what I’m looking for called, “Copy To Lyrics (Service) v1.1.” Script is as follows:

The only difference between the above script and the one I’m looking for is a.) I want to be able to paste the text into the tags of MULTIPLE tracks. This script only pastes into one selected track, and b.) I want the text to go into COMMENTS, or even better… the tag of my choice.

Can anyone help me?

set seltext to the clipboard

—prev code

if selection is not {} then
try
    set selectedTracks to selection
    repeat with this_track in selectedTracks
        set comment of this_track to (seltext as string)
    end repeat

— next code

You may need to check if you have a playlist selected or tracks selected.
Doug has tutorials on that.

On you get a list of the selectedTracks
Use repeat loop