Skip to main content
martinat35552217
Participating Frequently
February 12, 2016
Question

is there an easy script to apply detect edges

  • February 12, 2016
  • 2 replies
  • 824 views

hello

I need to apply a clipping path using detect edges with the same option on all the images in my doc

is there any script I can apply to do in bulk?

Thanks

Maritna

This topic has been closed for replies.

2 replies

tpk1982
Legend
February 13, 2016

Hi Maritna,

Use the below codings. THis will apply detecting edges. Is it what you want?

if (app.activeDocument.allGraphics.length>0)

{

  for (img=0; img<app.activeDocument.allGraphics.length; img++) {

    app.activeDocument.allGraphics[img].clippingPath.clippingType = ClippingPathType.DETECT_EDGES

}

}

Thanks,

Karthi

martinat35552217
Participating Frequently
February 17, 2016

Hi Karthi

Thank you, I've tried with script editor but it gives me syntax error.

I'm afraid my skills are too poor to try to make new actions but thanks anyway for have tried to help me

best,

Martina

LeoMari-eL6mBl
Inspiring
February 17, 2016

The Script tpk1982 works. Just try this:

#target indesign

var myDocument = app.activeDocument;

if (myDocument.allGraphics.length>0) 

  for (img=0; img<myDocument.allGraphics.length; img++) { 

    var detect = myDocument.allGraphics[img].clippingPath.clippingType = ClippingPathType.DETECT_EDGES

if (detect = true){

    alert("Exist Edges")}

Peter Spier
Community Expert
Community Expert
February 12, 2016

Moved to InDesign Scripting...