• 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: QuarkXpress: Gettings words
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QuarkXpress: Gettings words


  • Subject: Re: QuarkXpress: Gettings words
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 11 Jul 2001 10:52:55 -0700

On 7/11/01 10:19 AM, ThK <email@hidden> wrote:

>Quark returns "earth" when it is asked for "word x of line y of text box z
>of document d" and it was "earth." because it was the end of a sentence.
>
>But i need "earth." when it is "earth." and "earth" when it is "earth"!

This is not a Quark thing; it is an Applescript (actually, a Mac OS)
thing. Punctuation marks are never parts of words, so if you ask for a
word, you'll never get the punctuation.

For example
words of "how now, brown cow?"
-->{"how", "now", "brown", "cow"}

Note that both the comma and question mark are not included in the result.

set x to "The last man on earth."
set the foundword to the 5th word of x
if foundword is the last word of x then set foundword to foundword & the
last character of x
--> "earth."

Likewise

set x to "The last man on earth?"
set the foundword to the 5th word of x
if foundword is the last word of x then set foundword to foundword & the
last character of x
--> "earth?"

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: QuarkXpress: Gettings words
      • From: ThK <email@hidden>
  • Prev by Date: Re: scripts not compiling on OS X
  • Next by Date: Re: scripts not compiling on OS X
  • Previous by thread: Re: QuarkXpress: Gettings words
  • Next by thread: Re: QuarkXpress: Gettings words
  • Index(es):
    • Date
    • Thread