Hi
I have the following script, to delete rectangles with specific color fills, which works well
set TheOtherFrames to every rectangle of every spread
set OtherFramesCount to count of TheOtherFrames
repeat with i from 1 to OtherFramesCount
set TheOtherFrame to item i of TheOtherFrames
set TheOtherFrameColor to fill color of TheOtherFrame
set TheOtherFrameColorValue to color value of TheOtherFrameColor
if TheOtherFrameColorValue is {12.0, 3.0, 0.0, 0.0} then
delete TheOtherFrame
etc…
Now I want to make a list (DeleteUs) of color values but AS ignores my list even though the result looks OK.
Should I use other brackets? I have tried several…
set TheOtherFrames to every rectangle of every spread
set OtherFramesCount to count of TheOtherFrames
repeat with i from 1 to OtherFramesCount
set TheOtherFrame to item i of TheOtherFrames
set TheOtherFrameColor to fill color of TheOtherFrame
set TheOtherFrameColorValue to color value of TheOtherFrameColor
set DeleteUs to {{12.0, 3.0, 0.0, 0.0}, {40.0, 10.0, 0.0, 0.0}}
if TheOtherFrameColorValue is in DeleteUs then
delete TheOtherFrame
end if
return DeleteUs
I get this result:
{{12.0, 3.0, 0.0, 0.0}, {40.0, 10.0, 0.0, 0.0}}
Looks OK (?) but no delete…