Copy link to clipboard
Copied
hi .
script for select image into indesign .
pleas help me.
Copy link to clipboard
Copied
This would loop thru the active document and select each graphic
var g=app.activeDocument.allGraphics;
for (var i = 0; i < g.length; i++){
g.select();
//Do something
};
Copy link to clipboard
Copied
how script for select frame?
Like the following photo
Copy link to clipboard
Copied
how script for select frame?
The frame is usually a graphic's parent, so this version of the loop gets the width and height of the container frames by using .parent
var g=app.activeDocument.allGraphics;
for (var i = 0; i < g.length; i++){
//bounds returns as a list [y1, x1, y2, x2], so height is y2-y1
//parent is the graphic's container frame
var b = g.parent.geometricBounds
var w = b[3]-b[1];
var h = b[2]-b[0];
$.writeln("\nWidth: " + w + "\nHeight: " + h)
};
Copy link to clipboard
Copied
You'll get better responses over in the scripting forum
You don't have to select the image to get its properties.
This gets each image's bounds and then calculates the width and height and writes the results into the ExtendScript console.
var g=app.activeDocument.allGraphics;
for (var i = 0; i < g.length; i++){
//bounds returns as a list [y1, x1, y2, x2], so height is y2-y1
var b = g.geometricBounds
var w = b[3]-b[1];
var h = b[2]-b[0];
$.writeln("Width: " + w + "\nHeight: " + h)
};
Here is the complete InDesign JavaScript API
Copy link to clipboard
Copied
i want get height and width frame.
Take a look at the top photo.
now, i want get height and width frame in indesign . Like the following photo
Copy link to clipboard
Copied
This would get the width and height of a selected object;
var sel=app.activeDocument.selection[0];
var b = sel.geometricBounds;
var w = b[3]-b[1];
var h = b[2]-b[0];
alert("\nWidth: " + w + "\nHeight: " + h);
Copy link to clipboard
Copied
i want get height and width frame.
Take a look at the top photo
Copy link to clipboard
Copied
My question is that:
how select this frame for get hieght and width?.
I want to choose a frame like choose a img in indesign .
how script for select this frame In the picture below.
pleas help me. sorry
Copy link to clipboard
Copied
Perhaps it may assist us if the opening poster can kindly explain - in full detail - what the script is required for and how many more steps are involved. It's possible a script that the opening poster is after may exist for free in the public domain, and if that is the case a link can be provided.
Copy link to clipboard
Copied
i want script to select all text frames and get hieght , width any one text frame.
The script does the following(photo).