🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
3 messages
3 total messages Started by Rosemary Cantrell Wed, 01 Apr 2009 18:32
AS - Telling ID to find a specific layer
#26
Author: Rosemary Cantrell
Date: Wed, 01 Apr 2009 18:32
23 lines
2651 bytes
Hi all,
I trying to create a script that will be a part of a folder action
where I've grabbed an existing script that I use to export PDFs and
instead of the PDF making I'm trying to have it find an existing layer
called "notes" in my document and then change it's layer color to
magenta.  Here's the part that seems to wrong...

		tell application "Adobe InDesign CS3"
				launch
				set myDocument to open file (source_file as string)
				tell myDocument
					set myLayerN to page item layer "notes"
					set myLayer to make myLayerN with properties {layer color:magenta}
					save myDocument to target_path
					close myDocument
				end tell
			end tell

I'm getting an error saying invalid parameter. My guess is that I'm
not finding the notes layer correctly.  Can anyone offer any guidance?

TIA,
Rosie
Re: AS - Telling ID to find a specific layer
#27
Author: Olav_Kvern
Date: Wed, 01 Apr 2009 18:54
22 lines
892 bytes
Hi Rosie,

Replace:



set myLayerN to page item layer "notes" 
set myLayer to make myLayerN with properties {layer color:magenta}



With:



set myLayerN to layer "notes" 
--no need to create a new layer 
set layer color of myLayerN to magenta

Thanks,

Ole
Re: AS - Telling ID to find a specific layer
#33
Author: Rosemary Cantrell
Date: Wed, 01 Apr 2009 19:53
40 lines
2995 bytes
Ole,
Perfect thank you!!

I can see where I got myself mixed up.  This is what happens when I
try to use an existing script that I have for creating layers with
colors and modifying it change an existing layer. :) Thank you again!

Thanks,
Rosie


On Wed, Apr 1, 2009 at 1:54 PM, Olav Kvern <member@adobeforums.com> wrote:
> A new message was posted by Olav Kvern in
>
> InDesign Scripting --
> ��AS - Telling ID to find a specific layer
>
> Hi Rosie,
>
> Replace:
>
> set myLayerN to page item layer "notes"
> set myLayer to make myLayerN with properties {layer color:magenta}
>
> With:
>
> set myLayerN to layer "notes"
> --no need to create a new layer
> set layer color of myLayerN to magenta
>
> Thanks,
>
> Ole
>
> ________________________________
> View/reply at AS - Telling ID to find a specific layer
> Replies by email are OK.
> Use the unsubscribe form to cancel your email subscription.
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads