Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Find fill colour frames in images

$
0
0

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


Viewing all articles
Browse latest Browse all 15932

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>