This script will batch-set each selected track as "played" or "unplayed"; that is, the track property unplayed will be set as false or true, respectively. Requires iTunes 7.1 or better. (This emulates the "Mark As New/Viewed/Watched" item in a track's contextual menu. Audio tracks, however, do not have this option but do have the unplayed property.)
Designated as a Retro Script because: iTunes can do this via contextual menu.
OBLIGATORY WARNING! Because this script has been designated as a "Retro Script" there is no guarantee that it will function as described and may even corrupt or destroy data.