8 Replies Latest reply on Oct 14, 2010 8:25 AM by Jaswin

    InDesign CS5 Properties / Methods???

    Jaswin Level 1

      What are the new properties and methods added in InDesign CS5???

      Is there any scripting reference given from Adobe???

      or else

      please list out those.

        • 1. Re: InDesign CS5 Properties / Methods???
          Marijan Tompa [tomaxxi] Level 4

          Hey!

           

          I suggest you to take a look at Peter Kahrels list about properties and methods here:

          http://www.kahrel.plus.com/indesign/pdf_dictionaries.html

           

          And I personaly use Jongware's Scripting Reference:

          http://www.jongware.com/idjshelp.html

           

          Also ESTK has great "JavaScript Tools Guide CS5" PDF available from Help menu.

           

          Hope that helps.

           

          --

          tomaxxi

          http://indisnip.wordpress.com/

          1 person found this helpful
          • 2. Re: InDesign CS5 Properties / Methods???
            Jeremy bowmangraphics Level 2

            I don't doubt that Jongware's Scripting Reference is exceptional, like everything he puts his hand to...

             

            I just never quite figured out how to use it properly. An instructional video or some sort of very simple beginner's tutorial would be great!

            • 3. Re: InDesign CS5 Properties / Methods???
              [Jongware] Most Valuable Participant

              So, there's nothing on this on Lynda.com?

               

              Well, for starters, it's a command reference -- not a tutorial or a Get Started kit. So if you (not you, Jeremy, but the more general "you") hope to d/l thiz great warez from Jongware and be able to write time your saving scripts right away, well, a deserved "Hah!" to ya. (I subscribed to Apple's Developer Forum just to read the posts going like "i d/l'ed da ipod sdk but how am i sposed to write my $$$ iapp with it plz help me!!!". Always good for a laugh.)

               

              By the way, the usability bit falls apart into two major groups. First is internal consistency -- the hyperlinks inside each page, already well stocked by Ole Kvern & assoc., and nudged a little bit closer to the insanely by yours truly.

               

              But do not overlook the second part: the CHM version is much better than the dumb-linked HTML pages, but only when viewed with a good CHM viewer. The viewer should not only be able to display the pages and link the links -- any web browser does as much --, but also provide easy access to the contents and the index, and, preferably, to a Full Text Search option, and, not necessary but preferred, to a Bookmark option. Windows' own CHM Help Viewer has that, and so has Robin Lu's iCHM viewer-for-the-Mac. From these, I use Full Text Search most often -- just because not everything is under the name one would expect in the index, it's still possible the exact term you are looking for is in some description field.

               

              My CHM version is better than Adobe's own, even though it is based on exactly the same file. Why am I so confident about that? It's because of the added value.

              It's not just the added hyperlinks. According to Adobe, you are supposed to have a mental model of the entire InDesign DOM before embarking on even the easiest of scripts. That means that if you see something like, (selected at random) "Bullet", you are supposed to be able to construct the entire object tree up to activeDocument, to be able to access and change a bullet. What item 'defines' the Bullet character? Let's take a look at the ESTK's built-in help; select "InDesign CS4 Document Object Model", and search for 'bullet'. After a fair bit of scrolling to the list of results, you'll see "Bullet" on its own -- it's not like it's alphabetically ordered, or something like that ... Click "Bullet", and you'll see a flash card (quite literally, I suppose), with the helpful text -- quoted in full:

               

              Bullet

              Adobe InDesign CS4 (6.0) Object Model

              Bullet character. Base Class: Preference

               

               

              Yip. Pee.

              Now do the same with your CHM viewer. You will get two screenfuls of information: the same single line that was in the ESTK's help (but now its 'base class' Preference is a hyperlink), plus:

               

              * 'Quicklinks' that point directly to methods-by-name that operate on items of the Bullet class.

               

              * Hierarchy: a graphical (sort of) display that shows where the Bullet class is used, the Bullet class itself in the center, and what classes are used by Bullet (which happens to be 'none at all' -- a bad example, after all!)

               

              * Properties: all properties of each item in the Bullet class. Everything-and-then-some is hyperlinked. What's a 'bulletFontStyle'? Click any of the AutoEnum, NothingEnum, or String links, and find out. Want to know more about the concise 'characterType' enum? Click that instead.

               

              * Methods: A detailed list of all methods that operate on Bullet class variables, plus all of their parameters. (Again: seems like the randomly picked 'Bullet' class isn't that interesting ... Sorry, I'm not going to rewrite this story with another example.)

               

              * Element of: where can you find a Bullet item in?

               

              * Used in: in which other functions ('methods') are Bullets used? (... none at all. Well, at least you know that much, now.)

               

              * Return: What functions return a Bullet item?

               

              If your intent was to change some specific bullet, you can decide what route to take from here.

              If you want to change the bullets as defined in paragraph styles, you see in both the Hierarchy field and in the 'parent' property that "paragraphStyles" are a valid parent.

              Click that, and you are taken to the ParagraphStyle page, where you can see its parent, in turn, can be a ParagraphStyleGroup (which you, erm, may ignore for the moment), or the Application itself -- meaning, it's somewhere in the default settings, or -- at last! -- a Document.

              Clicking "Document" will show you it has only one parent, the Application. At the bottom, you can see "Document" is in use for a lot of properties, amongst which is "Application.activeDocument", which, really, should sound somewhat familiar for starting scripters ...

               

              You can traverse the other way, too: now you know how to get from Document to ParagraphStyles to Bullet, so you can go back and forth, examining what properties and methods are available to actually change the bullet for that one paragraph style you wanted to write a script for.

               

              What this command reference does not tell you is how to use this awesome power; it doesn't say anywhere you need something like

               

              app.activeDocument.paragraphStyles.item("MyBulletedList_1").bulletChar.characterValue = 0x003f

               

              to change this one to a question mark. That's what you need the Javascript Tools Guide for -- but as soon as you know the syntax, you can go and find yourself a solid place to stand and a very long pole, and Move The World -- one property at a time.

              1 person found this helpful
              • 4. Re: InDesign CS5 Properties / Methods???
                Marc Autret Level 4

                See also: http://www.indiscripts.com/post/2010/10/so-what-s-new-in-indesign-cs5-scripting-dom

                to investigate specific CS5 new features (objects, properties/methods, enumeration values).

                 

                @+

                Marc

                • 5. Re: InDesign CS5 Properties / Methods???
                  Peter Kahrel Adobe Community Professional & MVP

                  Very nice, Marc!

                   

                  Peter

                  • 7. Re: InDesign CS5 Properties / Methods???
                    Jeremy bowmangraphics Level 2

                    [Jongware] wrote:

                     

                    * Element of: where can you find a Bullet item in?

                     

                    * Used in: in which other functions ('methods') are Bullets used? (... none at all. Well, at least you know that much, now.)

                     

                    * Return: What functions return a Bullet item?

                     

                    That's exactly the sort of information I was looking for -- that's a really, really helpful tutorial. Thanks! And that fact that the "Bullet" class has few methods isn't a shortcoming, because it prompted me to look up the equivalent with some other more familiar classes, to compare/contrast them...

                     

                    What this command reference does not tell you is how to use this awesome power

                     

                    I've got an inkling of that already!

                     

                    One thing that was holding me up was I normally use a Mac, and used to look at the CHM on my PC (which doesn't have InDesign). The "disconnect" between the two wasn't good for my brain... But now I'm going to try out Robin Lu's CHM viewer.

                     

                    Thanks again!

                    • 8. Re: InDesign CS5 Properties / Methods???
                      Jaswin Level 1

                      Thanks for all