3 Replies Latest reply on Jul 7, 2008 5:32 PM by (Dylan)

    [AS CS2] Create a list of all items whose clipping type = detect edges

    Level 1
      I am creating myself a light preflight script for Indesign CS2 documents where a part of it creates a list of all the images that have had the clipping path "detect edges" applied. But I am struggling to work out how to address the clipping path settings. This is basically what I have tried:

      set BadClipping to the name of every link whose clipping type is detect edges
      display dialog "The following images have detect edges on: " & (BadClipping as string)

      Any help is greatly appreciated.
        • 1. Re: [AS CS2] Create a list of all items whose clipping type = detect edges
          Level 1
          Hi Dylan,

          The link itself does not have a clipping path--it's the graphic that has that. The parent of the link is the graphic itself. I'm not sure how to construct a filter clause that will handle that (Shane will probably know), but you could always iterate through the links, then look at the clipping path property of the parent.

          Thanks,

          Ole
          • 2. Re: [AS CS2] Create a list of all items whose clipping type = detect edges
            sstanleyau Level 4
            On 8/7/08 10:43 AM, "Dylan" <member@adobeforums.com> wrote:<br /><br />> set BadClipping to the name of every link whose clipping type is detect edges<br /><br />'clipping type' isn't a property of links, so you're sunk there. You need to<br />go via graphics and the 'clipping path' property (the dictionary doesn't<br />list it for graphics for some odd reason, but all subclasses of graphic<br />support it so that's got to be a bug). 'clipping path' returns a reference<br />to the 'clipping path settings', one property of which is 'clipping type.<br /><br />So you need something like this:<br /><br />tell application "Adobe InDesign CS3"<br />    tell document 1<br />        try<br />            set BadClipping to every item of all graphics whose clipping<br />type of clipping path is detect edges<br />        on error<br />            -- none found<br />        end try<br />    end tell<br />end tell<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au>
            • 3. Re: [AS CS2] Create a list of all items whose clipping type = detect edges
              Level 1
              Fantastic Guys thanks for your help! And so quick too!
              Shane that certainly did the trick I had a feeling that the documentation I had and the Indesign dictionary were not telling me something.