2 Replies Latest reply on Dec 19, 2009 2:40 AM by Dirk Becker

    Run applescript on all open documents


      hi all,


      I have an applescript that was created to run on the active document. I dont have any applescript abilites but would like to change it to run on all open documents. the script removes all unused master pages and i would like it to run on all opened docs. what do i need to change to make it work?


      here is the script....



      set moreMasters to {}


      tell application "Adobe InDesign CS3"
          tell document 1
              set allMasters to every master spread
              set theMasters to applied master of every page
              repeat with x in theMasters
                  set end of moreMasters to applied master of x
              end repeat
              set theMasters to theMasters & moreMasters
              repeat with x in allMasters
                  if x is not in theMasters then delete x
              end repeat
          end tell
      end tell




      thanks in advance