Hi Mark,
You can try this script: https://raw.githubusercontent.com/jpobojewski/InDesign-Toolbox/master/Resize%20Selected%20Items.jsx
You can also select all the objects you want, and set the anchor point to the top center or left center point (the grid in properties), then type -.25 in the W (width) property.
If you want to roll your own, here’s how to get started:
This line of code will get you the current selection as an “array”, meaning you can select multiple text frames and iterate through them.
var selections = app.selection;
The iteration looks like this:
for (var i = 0; i < selections.length; i++) {
}
Inside the bracket, you’ll want to get the frame’s coordinates and use either resize or reframe. This part is a bit complicated, but essentially you are using the “resolve” method of a frame to get its current coordinates, then performing math on those coordinates and using resize or reframe using points (9 points = .125 in).
var frame = selections[i];
var topleft = frame.resolve(AnchorPoint.TOP_LEFT_ANCHOR, CoordinateSpaces.INNER_COORDINATES, true)[0];
var bottomright = frame.resolve(AnchorPoint.BOTTOM_RIGHT_ANCHOR, CoordinateSpaces.INNER_COORDINATES, true)[0];
var x1 = topleft[0] + 9;
var y1 = topleft[1];
var x2 = bottomright[0] – 9;
var y2 = bottomright[1];
frame.reframe(CoordinateSpaces.INNER_COORDINATES, [[x1, y1], [x2, y2]], true);
In that math, you are moving the x1 coordinate inward by 9 points (.125 in) and shrinking the x2 coordinate by .125. If you to change the height, you’d do the same operations on the y coordinates.
The full code put together:
var selections = app.selection;
for (var i = 0; i < selections.length; i++) {
var frame = selections[i];
var topleft = frame.resolve(AnchorPoint.TOP_LEFT_ANCHOR, CoordinateSpaces.INNER_COORDINATES)[0];
var bottomright = frame.resolve(AnchorPoint.BOTTOM_RIGHT_ANCHOR, CoordinateSpaces.INNER_COORDINATES)[0];
var x1 = topleft[0] + 9;
var y1 = topleft[1];
var x2 = bottomright[0] – 9;
var y2 = bottomright[1];
frame.reframe(CoordinateSpaces.INNER_COORDINATES, [[x1, y1], [x2, y2]]);
}
This also assumes you don’t need to resize the containing images after the resize. There’s lots of things that go into writing a script to do what you want to do, but hope this gives you a good starting point for understanding.