tell application "iTunes"
set maxCount to count items of selection
set loopCount to 1
set quo to "
" & return
repeat until (loopCount > maxCount) or (loopCount > 10)
if (genre of item loopCount of selection is "Classical") or (genre of item loopCount of selection is "Opera") then
set quo to quo & "- " & (composer of item loopCount of selection) & " -" & space
set quo to quo & "" & (album of item loopCount of selection) & "
" & space
set quo to quo & (name of item loopCount of selection) & "-" & space
set quo to quo & (artist of item loopCount of selection) & " " & return
else
set quo to quo & "- " & (artist of item loopCount of selection) & "-" & space
set quo to quo & "" & (name of item loopCount of selection) & "
" & space
set quo to quo & (album of item loopCount of selection) & " " & return
end if
set loopCount to loopCount + 1
end repeat
set quo to quo & "
"
end tell
set the clipboard to quo as text
display dialog ((loopCount - 1) as string) & " tracks copied to clipboard as HTML ordered list"