AppleScript Opaqueness in InDesign CS3

I was scripting InDesign CS3 and wanted to show what was happening on screen. How to do this is quite opaque and took me about an hour to figure out. Here it is:

tell application "Adobe InDesign CS3"
  set myWin to (layout window 1)
  set targetSpread to (parent of parent of theOrderHeader) -- spread -> page -> text frame
  tell myWin
    set active spread to targetSpread
    zoom myWin given fit spread
  end tell
end tell

In this sample, ‘theOrderHeader’ is a text frame that was just updated.

There must be a better way to do this, but whatever it is, it eluded me.

Mar 6, 2010 12:32 PM

google_pluslinkedingoogle_pluslinkedinby feather

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.