Hi All,
I am trying to find fill colour frames in images, my code is giving error as Object does not support the property or method "allPageItem"
could anyone solve this please.
var COLOR_NAME="color name string";
var currentPageItem;
for (var currentPageItem=0;currentPageItem<app.activeDocument.allPageItems.length;currentPageItem) {
currentPageItem=app.activeDocument.allPageItem[currentPageItem];
if ((currentPageItem instanceof Rectangle || currentPageItem instanceof Polygon)
&& currentPageItem.contentType==ContentType.GRAPHIC_TYPE
&& currentPageItem.fillColor==COLOR_NAME) { // do what you want
app.activeDocument.selection=currentPageItem;
alert("This box has fill color!!");
}
}
Thanks in advance
Steve