0 Replies Latest reply on Apr 9, 2008 4:51 AM by (Matt_McGregor)

    [AS] Master text frame to false, Adding pages based on Master page. Simple Queries

      Hi All,

      Working of a script to create an image frame then place images on the corrent number of pages.

      Portion of Script (open in Script Editor)

      set imageqty to 1

      tell application "InDesign CS"
      set myDocument to make document
      tell document preferences of myDocument
      set page height to "297mm"
      set page width to "210mm"
      set page orientation to portrait
      set facing pages to false
      -- set master frame to false
      set pages per document to imageqty
      end tell
      tell master spread 1 of myDocument
      make rectangle with properties ¬
      {geometric bounds:{"0mm", "0mm", "297mm", "210mm"}, label:"picbox"}
      end tell
      tell mydocument
      insert 9 pages with properties {applied Master A)
      end tell

      My 2 queries are as follows:

      1. What is the correct syntax for turning off the "Master Text Frame" when generating a new document?

      I would have though my "set Master Text Frame to false" to be correct but it returns:

      "A identifier can't go after this identifier" when trying to compile.

      2. What is the correct syntax for adding pages to a document based on a Master page?

      Expect something like : insert 9 pages with properties {applied Master A)

      It may be some weird anomaly (or I may just have it plain wrong!) but when using the above script if the number of pages is set to (Eg) 4. The first page is based on the Master page A. and the rest are just blank, so the frame applied to the master text page doesn't appear on them.

      Thanks in Advance.


      PS. Suggestion to Adobe Forum Admins. Would it be possible to actually separate the Scripting Forum into the relevant scripting flavours. (AS / JS / VB). Very frustrating trying to search for solutions when clearly you're only after answers for ONE scripting language.