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

How to find image name placed in a particular rectangle

Community Beginner ,
Aug 21, 2017 Aug 21, 2017

Copy link to clipboard

Copied

I have been trying to extract the name of image placed in a particular rectangular using this code.

var doc = app.activeDocument;

var link;

var link_count = doc.links.length;

var i;

var rectangle, image;

for(i =1; i < link_count; i++){

  rectangle = doc.rectangles;

  //image = rectangle.getElements();

  image = rectangle.images 

  $.writeln(image[0].name); 

  rectangle.label = image[0].name;

}

But the result is undefined. Kindly help me on this code

TOPICS
Scripting

Views

215

Translate

Translate

Report

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
no replies

Have something to add?

Join the conversation