Copy link to clipboard
Copied
Goodmorning everyone,
not having experience with scripts, I immediately stopped trying to do this simple script that updates the size of the equation after correcting it.
var myEventNames = ["afterSelectionAttributeChanged"];
function RIDIMENSIONA() {
app.selection[0].graphics[0].verticalScale=100;
app.selection[0].graphics[0].horizontalScale=100;
app.selection[0].graphics[0].fit(FitOptions.FRAME_TO_CONTENT);
}
app.addEventListener(myEventNames[0], RIDIMENSIONA);
app.selection[0].graphics[0].itemLink.editOriginal();
after correcting the equation in indesign I get the message I am attaching.
I imagine that everything depends on my poor knowledge of the subject.
thanks for the help
ivan
1 Correct answer
The question is not clear, do you get the error message stating something on the lines "the object no longer exists". If so add the following line at the top of your script file
#targetengine myengine
This will create a persistent space where your script runs and hence the eventhandler that you are adding persists even after the script execution is finished.
-Manan
Copy link to clipboard
Copied
The question is not clear, do you get the error message stating something on the lines "the object no longer exists". If so add the following line at the top of your script file
#targetengine myengine
This will create a persistent space where your script runs and hence the eventhandler that you are adding persists even after the script execution is finished.
-Manan
Copy link to clipboard
Copied
many thanks for the prompt and resolute reply
Hello
ivan

