The Object Model Viewer

The object-model viewer (OMV) is one of the scripter’s best friends: it tells you about the properties that objects have and which methods are associated with each object. It does this for all CS applications. You find the OMV in the ESTK’s Help menu. Choose it to display it on your screen (CS3: Help → InDesign CS3 Object Model; CS4/5: Help → Object Model Viewer).

Figure 6. 

In CS4 and 5, we need to point the OMV to InDesign. The OMV defaults to “Core JavaScript Classes,” you put it in InDesign mode by picking “Adobe InDesign CS5 (7.0) Object Model” in the dropdown indicated by the arrow in Figure 6. In Figure 6 you see CS5’s viewer (CS4’s viewer is virtually the same; that of CS3 looks different but works virtually the same). The OMV has three panes of interest to us:

  • Classes shows the classes (flagged with ) and enumerations (). In Figure 6, I selected the object Document. In this pane, you can type a letter to jump to the section starting with that letter.

  • Properties and Methods displays the properties () and methods () associated with the object displayed in the ...

Get Scripting InDesign CS3/4 with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.