Re: Indesign CS --> Adobe Indesign CS3
Re: Indesign CS --> Adobe Indesign CS3
- Subject: Re: Indesign CS --> Adobe Indesign CS3
- From: Shane Stanley <email@hidden>
- Date: Wed, 26 Sep 2007 22:18:06 +1000
- Thread-topic: Indesign CS --> Adobe Indesign CS3
On 26/9/07 9:52 PM, "Wayne Melrose" <email@hidden> wrote:
> on OverrideMasterPageItems(PageNumber, MasterPage)
> tell application "Adobe InDesign CS3"
> tell front document
> -- check for either left or right side of the master
> try
> if (PageNumber) mod 2 is 0 then
> set myMasterPage to page 1 of master spread MasterPage
> set strLabel to "left"
> else
> set myMasterPage to page 2 of master spread MasterPage
> set strLabel to "right"
> end if
> on error -- must be a single page master, default to page 1
> set myMasterPage to page 1 of master spread MasterPage
> set strLabel to ""
> end try
You can also use CS3's new "side" property of a page:
-- check for either left or right side of the master
set theSide to side of page PageNumber
if theSide is right hand then
set myMasterPage to page 1 of master spread MasterPage
set strLabel to "right"
else if theSide is left hand then
set myMasterPage to page 2 of master spread MasterPage
set strLabel to "left"
else
set myMasterPage to page 1 of master spread MasterPage
set strLabel to ""
end if
> -- be sure to set a label in your template
> set lstPageItems to (page items of myMasterPage whose label is
> strLabel)
>
> -- if the list is empty, then select every page item
> if lstPageItems is {} then
> set lstPageItems to (page items of myMasterPage)
> end if
> -- incase there is more than 1 grouped item, loop the
> lstPageItems list
> repeat with pageItem in lstPageItems
> override pageItem destination page page PageNumber
> end repeat
You might try this instead:
try
override (page items of myMasterPage whose label is strLabel)
destination page page PageNumber
on error
override page items of myMasterPage destination page page PageNumber
end try
But I'd still like to see the document, because I'm not 100% convinced that
labelling is required.
--
Shane Stanley <email@hidden>
AppleScript Pro Florida, Feb 2008 <http://scriptingmatters.com/aspro>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden