1 Reply Latest reply on Oct 3, 2008 7:54 AM by (MikeSully)

    Access text frame by XML tag?

      Does anyone know how to change the text of a text frame based on the XML tag name/ID using AppleScript?
        • 1. Re: Access text frame by XML tag?
          Level 1
          Incase anyone wants to know how to do this:

          tell application "Adobe InDesign CS2"
          tell document 1
          tell XML tag "Bob" -- set XML tage name
          set txt_micro_Frame to object reference -- get the reference to the object the tags attached to in this case the text frame id
          end tell
          set _id_micro to id of every text frame whose markup tag of associated XML element is equal to txt_micro_Frame
          -- set txt_micro_Frame to the id of associated text frame
          set txt_micro_FrameText to contents of text frame id _id_micro
          end tell
          end tell

          try
          -- Set the text to the assigned frame
          tell application "Adobe InDesign CS2"
          tell document 1
          tell parent story of text frame id _id_micro
          set contents to "blah"
          end tell
          end tell
          end tell
          end try