Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

is there an easy script to apply detect edges

Community Beginner ,
Feb 12, 2016 Feb 12, 2016

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

TOPICS
Scripting
863
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2016 Feb 12, 2016

Moved to InDesign Scripting...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 12, 2016 Feb 12, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 17, 2016 Feb 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 17, 2016 Feb 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")}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 17, 2016 Feb 17, 2016

Thank, it gives me a different error now:

Syntax Error: Expected end of line, etc. but found identifier

Schermata 2016-02-17 alle 12.51.53.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 17, 2016 Feb 17, 2016
LATEST

You are using Apple Script ..

Copy and paste the ExtendScript Toolkit. Save as .jsx

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines