3 Replies Latest reply on Dec 14, 2015 2:49 AM by sreekarthik.k@gmail.com

    base align

    Level 1

       

      is there any way to base align columns via script

       

      Capture.PNGthe image shows my layout

        • 1. Re: base align
          S Hopkins Adobe Community Professional

          Set the vertical balance columns for the text frame's text frame preferences.

          In ExtendScript:

          var frameRef = app.selection[0];

          frameRef.textFramePreferences.verticalBalanceColumns = true;

           

          In AppleScript:

          tell application "Adobe InDesign CC 2015"

            set selList to selection

            set frameRef to item 1 of selList

            tell text frame preferences of frameRef

            set vertical balance columns to true

            end tell

          end tell

          • 2. Re: base align
            Level 1

            Is this possible via java script

            • 3. Re: base align
              Level 1

              var doc  =app.activeDocument;

              var tFrame = app.selection[0];

               

               

               

               

              while(tFrame.overflows == false)

                {

                try{

                var newBt =  (tFrame.geometricBounds[0] + tFrame.geometricBounds[2])/2;

                tFrame.geometricBounds = [tFrame.geometricBounds[0], tFrame.geometricBounds[1], newBt, tFrame.geometricBounds[3]];

                }catch(e){

                error = true;

                break;

                }

                  }

               

               

              while(tFrame.overflows == true)

                {

                  x = tFrame.geometricBounds[0]; y = tFrame.geometricBounds[1]; z = tFrame.geometricBounds[3]; a = tFrame.geometricBounds[2]       

                  tFrame.geometricBounds = [x, y, a+1, z];

                    }