Resize Anchored Frames with Script
Hi, I have a number of anchored frames throughout a book that are oddly sized. I would like to create an automatic script that resizes them to the graphic, but I'm having some trouble. After piecing together other posts I am currently working with:
var doc = app.ActiveDoc;
var graphic = doc.FirstGraphicInDoc;
while( graphic.ObjectValid( ) )
{
if( graphic.constructor.name == "AFrame" )
{
AFrame.Height = graphic.Height + (2 * 65535);
}
graphic = graphic.NextGraphicInDoc;
}But when I run the script nothing happens. I've checked the console and there are no errors, so I assume I have something incorrect here. The FM scripting guides I've found don't seem to cover anything graphic related. Any assistance is appreciated!
