Question
Select all graphics with horizontal scale >90% and change them to 100%
How to select all images with scale >90% and change them to 100%
The following code ignores the if statement and zooms ALL images to 100%
var myDoc = app.activeDocument;
var tfs = myDoc.allGraphics;
var value = 90;
for (var i = 0; i < tfs.length; i++){
if (tfs[i].horizontalScale > value);{
tfs[i].horizontalScale = 100;
tfs[i].verticalScale = 100;
tfs[i].fit(FitOptions.FRAME_TO_CONTENT);
}
}
