• 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
THANKS: Re: Determining a Paragraph's Index
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

THANKS: Re: Determining a Paragraph's Index


  • Subject: THANKS: Re: Determining a Paragraph's Index
  • From: Rick Gordon <email@hidden>
  • Date: Sat, 12 Aug 2006 12:21:33 -0700

Thanksa to Kai, Shane, Stan, and all for your help. With it I was able to get the rest of the way through a script to parse its way though a document seeking paragraph styles associated with tables and change al of the adjacent associated paragraphs to specifically styled tables.

It's been a while since I've done much scripting -- then mostly in Quark -- and had gotten rusty with even some of the basics.

Rick Gordon
(trying to get back in the game0

------------------

On 8/11/06 at 4:07 PM -0700, Stan Cleveland wrote in a message entitled
"Re: Determining a Paragraph's Index":

>On 8/11/06 3:27 PM, Shane Stanley wrote:
>
>> Get the index of the first character of the paragraph, and then get the
>> count of paragraphs of text from character 1 to character theIndex of the
>> story.
>
>That's brilliant, Shane. One must also consider that a selection may touch
>multiple paragraphs. To that end, and using your idea, this will give the
>the indices of the first and last paragraphs of the selection (which will be
>the same, if the selection involves only one paragraph):
>
>tell application "Adobe InDesign CS2"
>   tell selection
>      set firstPara to (count of paragraphs from character 1 ¬
>         to character (index of character 1)) of parent story
>      set lastPara to (count of paragraphs from character 1 ¬
>         to character (index of character -1)) of parent story
>   end tell
>end tell
>
>Stan C.

--

___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com
 _______________________________________________
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

  • Prev by Date: Re: How do I return full numbers in a user in put list?
  • Next by Date: PDF all pages as single pages script. - how to choose (a) document(s)?
  • Previous by thread: Re: How do I return full numbers in a user in put list?
  • Next by thread: PDF all pages as single pages script. - how to choose (a) document(s)?
  • Index(es):
    • Date
    • Thread