4 Replies Latest reply on Oct 3, 2016 8:27 AM by lvogt48

    Novice needs help

    lvogt48 Level 1

      While I am competent in InDesign, I have never used Applescript. I have MANY InDesign docs with the same standard layout which must be changed to a new format. The content remains the same but:

      Text boxes must move, be resized and the pargraph syles must be changed.

      Images and colored rectangles must be resized and moved.


      I don't expect anyone to write this for me but it would be very helpful for me to know the proper syntax for the operations so I can get this task done efficiently. The current documents are tightly laid out and all of the fonts are set to proper paragraph styles. 


      If anyone cares to help I will be very grateful.  Thank you in advance.

        • 1. Re: Novice needs help
          [Jongware] Most Valuable Participant

          Can you narrow down what you need exactly? "Proper syntax" suggests you may want to look at Adobe's Scripting Guides. There ought to be one for AppleScript, containing lots of smaller and larger examples of the proper syntax: http://www.adobe.com/devnet/indesign/documentation.html


          * TextFrame has a 'move' method, and you can move 'by' a certain amount, or 'to' a specific position. You can hardcode these positions and everything will move by/to the same values; but if those values depend on other objects, you need a lot more code to first found out what values to use

          * similarly, TextFrame has a 'resize' method to change its size. Actually, I'd rather manipulate its geometricBounds directly and do this and a move at the same time – but it depends on your needs.

          * changing paragraph styles is a doozy. It can be as easy as


          app.activeDocument.paragraphStyles.item("Body text").pointSize = 10.5;


          (which is JavaScript, but in AppleScript it would be pretty much the same thing).

          * Images and colored rectangles are conceptually the same thing as text frames, and can be adjusted exactly like them.

          • 2. Re: Novice needs help
            S Hopkins Adobe Community Professional


            I am an AppleScript specialist who has written a book on AppleScript for InDesign. I would love to help you get up to speed on working with AppleScript. I write a blog almost weekly that includes code for various automation tasks. Take a look at the subjects there and if you don't find what you need, let me know. I am always looking for a topic to cover with my blogs. The blog is locatedd at yourscriptdoctor.com/blogs

            Shirley W. Hopkins


            • 3. Re: Novice needs help
              lvogt48 Level 1

              Thank you for the response. I will check it out.

              • 4. Re: Novice needs help
                lvogt48 Level 1

                I will check it out.  Thank you for the response.