Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[CC14][AS][JS] Applying Auto-Size settings to a text frame

New Here ,
Nov 15, 2014 Nov 15, 2014

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!

TOPICS
Scripting
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Nov 15, 2014 Nov 15, 2014

Given a text frame called myFrame, here's one example:

myFrame.textFramePreferences.autoSizingType =

AutoSizingTypeEnum.HEIGHT_ONLY;

myFrame.textFramePreferences.autoSizingReferencePoint =

AutoSizingReferenceEnum.LEFT_CENTER_POINT;

Translate
People's Champ ,
Nov 15, 2014 Nov 15, 2014

Given a text frame called myFrame, here's one example:

myFrame.textFramePreferences.autoSizingType =

AutoSizingTypeEnum.HEIGHT_ONLY;

myFrame.textFramePreferences.autoSizingReferencePoint =

AutoSizingReferenceEnum.LEFT_CENTER_POINT;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2014 Nov 15, 2014
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines