Re: QuarkXpress: Gettings words
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. |
----------------------------------------------------------------------