RE: Indesign CS overriding master page items
RE: Indesign CS overriding master page items
- Subject: RE: Indesign CS overriding master page items
- From: "Sprague, Graham" <email@hidden>
- Date: Mon, 24 May 2004 14:19:34 -0400
How come every time I try to use the override command I get "<insert any
object here> doesn't understand the override message". I am pretty good with
Applescript but I cannot seem to make anything happen with Indesign. I am
doing something very wrong. I am so not getting this. Here's some sample
code that assumes you have created a page that has a master applied to it
and now you would like to override any master page items whose labels
contain the word "Text". Any help would be great.
set theItems to 0
tell application "InDesign CS"
tell document 1
tell page 1
set theItems to count of items of master page items
repeat with x from 1 to theItems
if (label of (item x of master page items) contains "Text") then
override page item (x) of master page items destination page page 1
end if
end repeat
end tell
end tell
end tell
>
----------
>
From: Sprague, Graham
>
Sent: Friday, May 21, 2004 2:09 PM
>
To: AS user list; 'Shane Stanley'
>
Subject: RE: Indesign CS overriding master page items
>
>
Ahhhhh. I see. That makes perfect sense. I am going to change it so that I
>
am using named or labeled items to address each master page item. I think
>
that may simplify this quite a bit. Hey thanks, and by the way that site
>
you
>
set up is great. It's one of three places that acutally mentions the
>
override command. The other two being the ID dictionary and the indesign
>
scripting reference pdf.
>
>
> ----------
>
> From: Shane Stanley
>
> Sent: Thursday, May 20, 2004 6:50 PM
>
> To: AS user list
>
> Subject: Re: Indesign CS overriding master page items
>
>
>
> On May 21, 2004, at 7:16 AM, Sprague, Graham wrote:
>
>
>
> > Anyone know how to overide a master page item. Here some sample code I
>
>
> > found
>
> > which works but I want to address the items as they would be addressed
>
>
> > if
>
> > they were not master page items(like after the page is detached). For
>
> > example if I Detach the whole page then I can access individual items
>
> > like
>
> > (rectangle 13) but I cannot seem to do it that way when they are still
>
> > linked to the master page. Rectangle 13 is not rectangle 13 when it is
>
>
> > still
>
> > part of the master page. Why adobe didn't use the same item order on
>
> > both
>
> > master page and page is beyond me.
>
>
>
> They did, actually. I suspect what's confusing you, in part, is that
>
> the act of detaching changes the order of items, because detached items
>
> are always brought to the front of their layer.
>
>
>
> > What I would like to do is this but it does not work. I get an error
>
> > "can't
>
> > get rectangle 13"
>
> >
>
> > tell application "InDesign CS"
>
> > tell document 1
>
> > override rectangle 13 of master page items of page 1 destination
>
> > page
>
> > page 1
>
> > end tell
>
> > end tell
>
>
>
> "master page items" is a property, so that can't work. I think what
>
> you're after is this:
>
>
>
> tell application "InDesign CS"
>
> tell document 1
>
> set theMaster to applied master of page 1
>
> override rectangle 13 of page 2 of theMaster destination
>
> page page 1
>
> end tell
>
> end tell
>
>
>
> --
>
> Shane Stanley <email@hidden>
>
> _______________________________________________
>
> applescript-users mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.