2 Replies Latest reply on Nov 15, 2014 12:35 PM by vincentp62

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

    vincentp62 Level 1

      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!

        • 1. Re: [CC14][AS][JS] Applying Auto-Size settings to a text frame
          TᴀW Adobe Community Professional & MVP

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

           

          myFrame.textFramePreferences.autoSizingType =

          AutoSizingTypeEnum.HEIGHT_ONLY;

           

          myFrame.textFramePreferences.autoSizingReferencePoint =

          AutoSizingReferenceEnum.LEFT_CENTER_POINT;

          • 2. Re: [CC14][AS][JS] Applying Auto-Size settings to a text frame
            vincentp62 Level 1

            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