2 Replies Latest reply on Jan 17, 2015 2:37 PM by briank84322880

    InDesign Master Page Overrides in Applescript

    briank84322880

      I’m upgrading from InDesign CS3 to InDesign CC and am having trouble with a portion of my Applescript script that used to override master page items in the document pages. Below is the relevant portion of the script:

       

      set applied master of page 1 to master spread "A-IndexPage"

      repeat with k from 1 to IndexBoxCount

      set LockItem to item k in IndexBoxNames

      override page item LockItem of master spread "A-IndexPage" destination page page 1

                end repeat

       

      Has something changed from CS3 to now that completely changes the way Applescript talks to master page items? I’ve upgraded about 200 pages of scripts, but this is the only significant issue I’ve had that I haven’t been able to figure out.

       

      I'm scripting on the latest version of Yosemite.

        • 1. Re: InDesign Master Page Overrides in Applescript
          JohnDevlon Level 1

          try this...

           

           

          tell application "Adobe InDesign CC"
             
              tell active document
                 
                  -- loop over every page
                  repeat with x from 1 to count pages
          
                      -- apply master page
                      set applied master of page x to master spread "A-IndexPage"
          
                      -- overide the items
                      override (every item of master page items of page x) destination page page x
          
                  end repeat
                 
              end tell
             
          end tell
          
          • 2. Re: InDesign Master Page Overrides in Applescript
            briank84322880 Level 1

            Thanks for the reply, John. I actually need to leave some of the page items static, so I'm only overriding needed items. This is the line I ended up using:

            override (every item of master page items of page x whose label ≠ "") destination page page 1