• 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
Xpress 4.11 - further colour question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xpress 4.11 - further colour question


  • Subject: Xpress 4.11 - further colour question
  • From: email@hidden
  • Date: Fri, 26 Apr 2002 12:55:43 +0100

I'm having trouble finding an efficient way of acheiving something in QXP.
I currently have a text box which I flow some text into. The result looks
something like this:

prod 1
prod 2
prod 3
prod 4 50% Off
Prod 5 50% Off

I want to change the colour of the "50% Off" bit if it appears. When it
does appear, it always appears after the tab and before a return, but may
say anything from "10% Off" to "Buy 3 Get 1 Free"

Basically, what I want to acheive is

repeat with i from 1 to the number of lines in story 1 of text box 1
if tab is in line i of story 1 of text box 1 then
set color of words between tab and return of line i of story 1 of text box
1 to "Some Colour"
end if
end repeat

At the moment, all I've acheived is a long winded loop that checks each
character to see if it's between a tab and a return.

dumbed-down version: (Only 'dumded down' because the full length isn't
relevant!)
if char x is tab then set tabcounter to 1
if char x is return then set tabcounter to 0
if tabcounter is 1 then set color of char x to "some colour"

This is because I can't use the standard additions Offset as QXP thinks I
mean the Offset property of a text box and complains about "making some
data into the expected type".

Any suggestions greatfully received
Thanks in advance

Steve
_______________________________________________
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.

  • Prev by Date: Re: Pantone Colours in Xpress 4.11
  • Next by Date: Re: Beep broken in 10.1.4?
  • Previous by thread: Re: Pantone Colours in Xpress 4.11
  • Next by thread: Re: Xpress 4.11 - further colour question
  • Index(es):
    • Date
    • Thread