• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: InDesign CS2: Test graphics for item layer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InDesign CS2: Test graphics for item layer


  • Subject: Re: InDesign CS2: Test graphics for item layer
  • From: "Stockly, Ed" <email@hidden>
  • Date: Fri, 05 Sep 2008 14:25:35 -0700
  • Thread-topic: InDesign CS2: Test graphics for item layer

>>David>I've put together the code below. When the script reaches
>> "if name of item layer of i is. . ."

>>it errors, stating, "Can't get item layer of 1."

>> repeat with i from 1 to count of myGraphics


The error your getting is due to the construct of your repeat loop.

In this loop:

repeat with i from 1 to count of myGraphics

The variable i  has a value of 1 then 2 then 3 etc. each time the loop is
executed.

You literally asking for the layer of the integer 1, which trips the error.

"if name of item layer of graphic i is. . ."

Is closer to what you want, but in CS2, item layer is not a property of
graphic, so that probably won't work.

You may need to try something like this:

(totally untested)

repeat with thisGraphic in myGraphics
 repeat with x from 1 to count of item layers
   if thisGraphic is in item layer x then
      set LayerName to name of item layer x
      exit repeat
   end if
 end repeat

HTH,
ES

 _______________________________________________
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

  • Follow-Ups:
    • Re: InDesign CS2: Test graphics for item layer
      • From: David Wolfe <email@hidden>
  • Prev by Date: Re: InDesign Page #
  • Next by Date: Re: InDesign CS2: Test graphics for item layer
  • Previous by thread: InDesign CS2: Test graphics for item layer
  • Next by thread: Re: InDesign CS2: Test graphics for item layer
  • Index(es):
    • Date
    • Thread