Copy link to clipboard
Copied
how script for select rectangle in indesign.
Copy link to clipboard
Copied
This thread is active elsewhere in the Adobe Forums where it is receiving appropriate responses: script for select image into indesign .
Copy link to clipboard
Copied
pleas more discreption.
Copy link to clipboard
Copied
Shahirara - this is a note to the moderators to say that you have already asked this question here: script for select image into indesign .
Copy link to clipboard
Copied
no. These two questions are different.
Copy link to clipboard
Copied
Oh, sorry about that, I do apologise.
Try this snippet. I use it in my script to select all rectangles in an active InDesign file. It's part of a larger script that goes through a document and removes any frames that are blank. For your purposes, this should be what you're after.
var myGraphicFrames = app.activeDocument.rectangles;
for (i=myGraphicFrames.length-1; i>=0; i--) {
//do your thing here
}
However, this question was asked in the general InDesign forum. You may get more targeted and better answers in the InDesign Scripting subforum.
Copy link to clipboard
Copied
What scripts do you select with all the rectangle?
I just want to select all rectangles with script.
What is this script?
Copy link to clipboard
Copied
Hi shahriara7551080 ,
if you want to select e.g. all rectangles on a spread there is a preinstalled script waiting for you in your InDesign's Scripts panel: Samples > JavaScript > SelectObjects.jsx
Unfortunately the default with this script is that all options are preselected:

To change the default state of the checkboxes inspect lines 37 to 45 of the script and change:
checkedState:true
to
checkedState:false

The new defaults for SelectObjects.jsx showing after changing true to false in lines 37 to 45:

Now the script is easier to handle.
If you want to select all rectangles in the spread, just do one click and press OK.
Before you had to do eight clicks and press OK.
Regards,
Uwe
Copy link to clipboard
Copied
How to find the proper forum for scripting questions? InDesign Scripting
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more