Change Text frame width from prompt
Hi,
I need to change the text frame width by getting values by prompt. Tried with resize method but not able to pass the prompt value.
app.activeDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.INCHES;
app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.INCHES;
var myTableParent=app.activeDocument.selection[0].parentTextFrames[0]
//~ var parentWidth = myTableParent.geometricBounds[3] - myTableParent.geometricBounds[1];
var myvaluesprompt=prompt("Please enter the desired value (IN INCHES)","");
myTableParent.resize(
CoordinateSpaces.pasteboardCoordinates,
CoordinateSpaces.INNER_COORDINATES,
AnchorPoint.TOP_LEFT_ANCHOR,
ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,
[myvaluesprompt, ResizeConstraints.KEEP_CURRENT_VALUE] );
Please select some text in the text frame. Hope you aware i used parenttextframe.
Advance Thanks,
K