tell application "iTunes"
set fx to «class pFix»
set «class pFix» to true
copy (a reference to (get «class pPly» of front window)) to thisPlaylist
if item 1 of selection exists then -- test if there is a selection...
set using_selection to true
copy (count selection's items) to idx
else -- its the whole playlist
set selectedTracks to (get a reference to thisPlaylist)
set using_selection to false
copy (count thisPlaylist's every «class cTrk») to idx
end if
-- later...
repeat with j from 1 to idx
if using_selection then
copy item j of selection to thisTrack
else
copy «class cTrk» j of selectedTracks to thisTrack
end if
delete every «class cArt» of thisTrack
end repeat
set «class pFix» to fx
end tell