Copy link to clipboard
Copied
Hi all,
I'm not a pro, but can you please help me to understand what's wrong with this script?
scaledElements = app.activeDocument.allPageItems;
for (i = 0; i < scaledElements.length; i++) {
scaledElements.redefineScaling();
}
I'm trying to apply a "redifine scaling to 100%" to all document elements in one click.
Thank you in advance.
You need to refer to each individual pageItem by using the for loop i counter, like so:
var scaledElements = app.activeDocument.allPageItems;
for (i = 0; i < scaledElements.length; i++) {
scaledElements[i].redefineScaling();
}
Copy link to clipboard
Copied
You need to refer to each individual pageItem by using the for loop i counter, like so:
var scaledElements = app.activeDocument.allPageItems;
for (i = 0; i < scaledElements.length; i++) {
scaledElements[i].redefineScaling();
}
Copy link to clipboard
Copied
Thank you. It works perfectly!