7 Replies Latest reply on Nov 15, 2008 9:05 AM by [Jongware]

    [CS4,JS] [ANN] JS Help as HTML

    [Jongware] Most Valuable Participant
      A HTML version of the Adobe InDesign JavaScript help for CS4. Took me a couple o' minutes to compile, and then a few hours more to add
      i even more
      hyperlinks (this time, it resolves all 'any' references in enumerations) and -- may come in handy -- expands the Hierarchy using the new Base Class description for Color, Text, Preferences (a lot of 'em) and a few more. It's almost 100 pages longer than the CS3 version!

      A preliminary version, not thouroughly checked, but you can give it a try with this 1.0.0 version (2.3MB, zipped).
      It might need some debugging; a CHM version is planned but not yet available.

      Remember where you saw it first. You Can Copy it but You Cannot Top it.
        • 1. Re: [CS4,JS] [ANN] JS Help as HTML
          Level 1
          Great job! Thank you very much.

          Most of my comments and issues are about the underlying information, not your presentation of them. For example:

          Array of Rectangle everyItem ()
          Returns every Rectangle in the collection.

          It is not true that:


          returns an array of rectangles. To get that, you need:


          That gives you the array of every rectangle in the document that is "loose" on a page.


          returns an object specifier. If there are multiple rectangles in the document, then each property of this object is an array of values, one for each rectangle. That's why:


          for example, returns an array of the geometricBounds values of all the rectangles in the document.

          This observation about the way the everyItem() is described applies to every instance.

          • 2. Re: [CS4,JS] [ANN] JS Help as HTML
            [Jongware] Most Valuable Participant
            Glad to be of service, Dave. (...)

            You are absolutely right -- this is just a command reference. The actual behavior of, and when and how to use, the classes and properties can only be found through the samples in the Scripting Guide (is that updated to CS4 as well?). Or through trial, error, and careful observation of what goes wrong where, which is where you come in! The most interesting posts for me in this forum are those that say 'I did it the logical way but it din't work'.

            A note for wannabee Javascripters: this is Not a starting guide!
            • 3. Re: [CS4,JS] [ANN] JS Help as HTML
              Peter Kahrel Adobe Community Professional & MVP
              Great job, jongware!

              • 4. Re: [CS4,JS] [ANN] JS Help as HTML
                Level 1
                This is the home page for InDesign Scripting on Adobe.com:


                and here's a direct link that will download the JavaScript guide for CS4:

                http://wwwimages.adobe.com/www.adobe.com/products/indesign/scripting/pdfs/InDesignCS4_Scri ptingGuide_JS.pdf

                The guide uses everyItem() three times but doesn't explain it.

                • 5. Re: [CS4,JS] [ANN] JS Help as HTML
                  [Jongware] Most Valuable Participant
                  A new version is downloadable now: idcs4js.zip (2.2Mb). A few lingering links were fixed, notably in the 'Used in' field in Enumerations.

                  This version is also available as Windows CHM Help (1.5Mb), with thanks to ABC GREEN for his HTML-to-Help directions. Advantages over the HTML version: it's a single file, it's even more compressed than the ZIP, and Windows Help offers a Full Text Search. (The only
                  i disadvantage
                  I see is it doesn't support images as backgrounds. So much for the black-on-purple theme.)
                  • 6. Re: [CS4,JS] [ANN] JS Help as HTML
                    frameexpert Level 4
                    Excellent materials. Thank you very much for posting these.

                    • 7. Re: [CS4,JS] [ANN] JS Help as HTML
                      [Jongware] Most Valuable Participant
                      I almost forgot -- I also made a tagged text version.

                      It's not hyperlinked or bookmarked, because tagged text doesn't really plays nice for this. The tags need the
                      i absolute character offset
                      from the start of the text! Madness.

                      But you can format it any way you like. The tables are designed for A4, but I saw a Table resizing script just a couple of posts ago. Put in page headers and a table of contents, and presto! you have your own PDF Reference.