InDesign Pathfinder Scripting
I am writing a script that creates 2 intersecting boxes and then uses shape1.excludeOverlapPath(shape2); to subtract one shape from the other. The code works, but I would like to do more stuff with the resulting shape (change the fill color, add rounded corners, etc.), but I don't know how to select it.
I tried saving the result to override the original variable
shape1 = shape1.excludeOverlapPath(shape2);
I also tried to assign the result to a new variable
var newShape = shape1.excludeOverlapPath(shape2);
Neither of these ideas work; the errors either say the variable was changed or is undefined. Does anyone have any suggestions/advice about how to do this?
Thanks for your help!
