Re: addressing words between tabs in Xpress
Re: addressing words between tabs in Xpress
- Subject: Re: addressing words between tabs in Xpress
- From: Shane Stanley <email@hidden>
- Date: Wed, 01 May 2002 09:04:21 +1000
On 1/5/02 2:01 AM +1000, email@hidden, email@hidden,
wrote:
>
The most embarrassing thing about this is I've already asked this question,
>
got an answer and now can't find it. Please excuse me for asking this
>
again...
>
>
I have a text box in XPress (4.11 on 9.2) which contains something like:
>
>
product name <tab> 10% Off <tab> #10 <tab> #20 <CR>
>
product name <tab> 3 or more <tab> #29 <tab> #2 <CR>
>
product name <tab> 10% Off <tab> #23 <tab> #10 <CR>
>
>
and so on...
>
>
What I want to achieve in pseudo-script is
>
>
if discount contains "Off" then set color of bit between first tabs to
>
"red"
>
if discount contains "or more" then set color of bit between first tabs to
>
"blue"
You could get the offset of the tabs, something like:
offset of character 1 where it = " " of every paragraph
offset of character 2 where it = " " of every paragraph
And then repeat through them, using them as text offsets. That does require
that every paragraph you're targetting does have the required number of
tabs.
Or you can use Quark's delimit items to stop a space being regarded as a
word delimiter, and then just address the columns as words.
--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.