Compare Color in Illustrator 10

I am trying to work through my illustrator documents and delete any path items that have black fill.

This is my script snip:

set myObjectColor to fill color of item myObjectNum of selectedObjects
				
if myObjectColor = {cyan:0.0, magenta:0.0, yellow:0.0, black:100.0} then
	display dialog "Black"
	delete item myObjectNum of selectedObjects
else

However, it never gets a match on black objects. I’m guessing I can’t do a simple comparison of color info classes? But I can’t work out how else to make the comparison.

Please help!

I’ve answered my own question. However, would be interested to know if there is a neater way than comparing property by property.

This does the trick:

if (((cyan of myObjectColor) + (magenta of myObjectColor) + (yellow of myObjectColor) = 0) and black of myObjectColor = 100)

try:

myObjectColor = {class:CMYK color info, cyan:0.0, magenta:0.0, yellow:0.0, black:100.0}

-N

Perfect. I knew there had to be a better way. Many Thanks.