• 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: Shane Stanley <email@hidden>
  • Date: Thu, 12 Jul 2001 08:26:37 +1000

On 12/7/01 3:19 AM +1000, ThK, email@hidden, wrote:

> Problem:
>
> 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"!
>
> The background ist, that my script has to recognize prices, measurements and
> sizes that have to be converted into another language and format replacing the
> original word or words.
>
> Does anyone have an idea how to force this?`

I assume you're using version 4.11. The key is to use QXP's delimit table
item. This is a table of values for every character that essentially defines
how words are defined when scripting XPress. So you redefine the full point
as a word member, like this:

tell application "QuarkXPress 4.11"
set oldPoint to delimit item "." of delimit table 1
set delimit item "." of delimit table 1 to can be contained in word
tell story 1 of current box
set x to word 1
end tell
set delimit item "." of delimit table 1 to oldPoint
end tell
display dialog x

Note that:

(a) This doesn't change anything in the UI; and

(b) It remains in force until you either change it or quit XPress, so you
want to use it with care and lots of error trapping.

It's a very useful class that was inexplicably dropped after version 3.32,
but thankfully reappeared with 4.1.

--
Shane Stanley, email@hidden


  • Follow-Ups:
    • QXP's delimit tables
      • From: Alberto Salvagnini <email@hidden>
References: 
 >QuarkXpress: Gettings words (From: ThK <email@hidden>)

  • Prev by Date: Re: Margin measurements in QuarkXPress
  • Next by Date: Re: Snippet to remove an item from a list
  • Previous by thread: QuarkXpress: Gettings words
  • Next by thread: QXP's delimit tables
  • Index(es):
    • Date
    • Thread