7 Replies Latest reply on Feb 16, 2011 12:02 AM by Muppet Mark-QAl63s

    Trouble learning ExtendScript

    Natee1994

      I am trying to learn how to script InDesign with ExtenScipt, but am frustrated by the tools and documentation.

      Sadly CS4 doesn't have a pdf scripting reference. So if you can't find something in the many example scripts that you can modify, you run into problems.

       

      Specifically, if you only have the Object Model Viewer you cannot find any information about the DOM containment hierarchy. For example how can one find out that a Photoshop document cannot contain a text frame unless the document contains a layer without a hierachy reference?

       

      Take this bit of code for example where you want to manipulate a bit of selected text:

      var text = app.activeDocument.selection[0]

       

      From the OMV you can learn that a document object has a selection property which returns an array of objects. But to do anything further with the returned object you need to know what type of object it is. Without knowing the type you can't look it up in the OMV and so can't do anything with it.

       

      Is there a tool or a source of information that I am missing?