Re: Indesign CS MAC -applescript- How to copy items on a layer only
Re: Indesign CS MAC -applescript- How to copy items on a layer only
- Subject: Re: Indesign CS MAC -applescript- How to copy items on a layer only
- From: Jake Pietrykowski <email@hidden>
- Date: Tue, 03 May 2005 12:59:20 -0500
Patrik,
> On 5/3/05 12:18 PM, "Patrik B." wrote:
> Hi,
>
> I am rtying to script a function that copies a base from an Indesign CS (MAC)
> file to another one that has only text.
>
> The thing I have a problem with is how one selects every page item on a
> spread in indesign that is only part of a certain layer?
>
> I tried this:
>
> tell application "Indesign CS"
> activate
> set myDocument to active document
> set LayerName to "4 color Base" --this layer already exists along with others
> tell myDocument
> set myLayer to layer LayerName
> set myproperties to {item layer:myLayer}
> select every page item with myproperties
> end
> end
> end
>
> for some reason the script selects every item no matter which layer it is
> on. How do I have to word it so it only selects all the items on the layer I
> specify?
You must use object reference.
<code>
tell application "InDesign CS"
activate
set myDocument to active document
set LayerName to "4 color Base"
tell myDocument
set myLayer to object reference of (layer LayerName)
select every page item of myLayer
end tell
end tell
</code>
Best Regards,
Jake
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden