Re: INDESIGN: Determining Transparency
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