Re: Need help with Styling text in Quark
Re: Need help with Styling text in Quark
- Subject: Re: Need help with Styling text in Quark
- From: Frank Miedreich <email@hidden>
- Date: Wed, 24 Oct 2001 16:35:58 +0200
At 10:17 Uhr -0400 24.10.2001, Jeff Horton wrote:
The following script works but is ugly:
--------
set last word of paragraph nextP of objTB to (listPrice & tab & yourPrice &
" " & listUnit)
set tmpCnt to count of words of paragraph nextP of objTB
set tmpData to paragraph nextP of objTB as text
set tmpDataCnt to count of characters of tmpData
set tmpAdd to (count of characters of yourPrice) + (count of
characters of yourUnit) + (count of characters of listPrice)
set tmpFrom to (tmpDataCnt - tmpAdd - 1)
set tmpTo to tmpFrom + (count of characters of listPrice)
set style of characters tmpFrom thru tmpTo of (paragraph nextP
of objTB) to strikethrough
--------
Now, what I need to know is is there an easier way if I know which word I
want to set the style to strikethrough, can I just set that word instead of
figuring out where it is in the paragraph by character counting?
Can I not just:
Set style of word "4.00" of paragraph nextP of objTB to strikethrough
Thanks in advance!
Jeff Horton
yes you can do that almost exactly as you said it yourself:
set style of every text of paragraph nextP of objTB where it is
"4.00" to strikethrough
I have not tried this, but "4.00" may not be a word, but text should
work, and you can probably use "first" instead of "every".
cheers, Frank
--
Frank Miedreich
Mozquito Technologies -
http://www.mozquito.com/