Skip to main content
briank84322880
Participant
January 14, 2015
Question

InDesign Master Page Overrides in Applescript

  • January 14, 2015
  • 1 reply
  • 911 views

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.

This topic has been closed for replies.

1 reply

Inspiring
January 15, 2015

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

briank84322880
Participant
January 17, 2015

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