Copy link to clipboard
Copied
Hello,
Does someone knows how to apply Auto-Size settings to a text frame with Applescript (or with Javascript — i'll translate it)?
Thanks for your help!
Given a text frame called myFrame, here's one example:
myFrame.textFramePreferences.autoSizingType =
AutoSizingTypeEnum.HEIGHT_ONLY;
myFrame.textFramePreferences.autoSizingReferencePoint =
AutoSizingReferenceEnum.LEFT_CENTER_POINT;
Copy link to clipboard
Copied
Given a text frame called myFrame, here's one example:
myFrame.textFramePreferences.autoSizingType =
AutoSizingTypeEnum.HEIGHT_ONLY;
myFrame.textFramePreferences.autoSizingReferencePoint =
AutoSizingReferenceEnum.LEFT_CENTER_POINT;
Copy link to clipboard
Copied
Thanks for the quick reply!
I don't know if it's because i asked for help on a blog and here, but in the meantime i found my solution where it was obvious to search (and where i didn't went before): the InDesign_ScriptingGuide_AS.pdf file 😉
It seems that what i found in Applescript is more or less the same as your Javascript.
Here it is in Applescript for the record:
set TextFramePref to text frame preferences of parent of myTable
set auto sizing type of TextFramePref to height and width
set auto sizing reference point of TextFramePref to top left point
Find more inspiration, events, and resources on the new Adobe Community
Explore Now