• 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: Determining Transparency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: INDESIGN: Determining Transparency


  • Subject: Re: INDESIGN: Determining Transparency
  • From: Shane Stanley <email@hidden>
  • Date: Wed, 13 Aug 2008 09:30:48 +1000
  • Thread-topic: INDESIGN: Determining Transparency

On 13/8/08 3:14 AM, "Rick Gordon" <email@hidden> wrote:

> Is there a better way to get the page number than what I've done toward the
> bottom, without having to just dive through groups to some arbitrary level to
> get at it?

The parent of a frame is always going to be a page, spread, group or
character (for anchored items), so use a repeat something like this:

    set thisFrame to theTextFrame
    repeat
        set theClass to class of parent of thisFrame
        if theClass is page then
            set framePage to document offset of parent of thisFrame
            exit repeat
        else if theClass is spread then
            set framePage to document offset of page 1 of parent of
thisFrame
            exit repeat
        else if theClass is character then -- anchored frame
            set thisFrame to item 1 of parent text frames of parent of
thisFrame
        else
            set thisFrame to parent of thisFrame
        end if
    end repeat


--
Shane Stanley <email@hidden>


 _______________________________________________
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

References: 
 >Re: INDESIGN: Determining Transparency (From: Rick Gordon <email@hidden>)

  • Prev by Date: Re: INDESIGN: Determining Transparency
  • Next by Date: Re: Finder Script Idea: Take me to a Specific Folder?
  • Previous by thread: Re: INDESIGN: Determining Transparency
  • Next by thread: Finder Script Idea: Take me to a Specific Folder?
  • Index(es):
    • Date
    • Thread