Hi Eric

I dont see what's wrong... 

Though you dont need to change the <font and the </Font> tags, you seem to 
handle the rest
gracefully.

Though, i dont see what you want to change, this seems ok looking...

>    replace pFind with numToChar(3) && numToChar(27) & quote \
>       & the uPatternColor of this stack & quote & ">" & pFind \
>       & "</font>" in tText

what is pfind? A collection of numtochar(3)&numtochar(8), etc... that is 
going to be 
simplified with:
>                   numToChar(3) && numToChar(27) & quote \
>       & the uPatternColor of this stack & quote & ">" & pFind \
>       & "</font>"
?

what seems wrong in my confused mind is

you put the text into tText - ok
replace the tags - OK

 replace pFind with numToChar(3) && numToChar(27) & quote \
>       & the uPatternColor of this stack & quote & ">" & pFind \
>       & "</font>" in tText

and this doesn't seem ok. If you replace pfind (assume no tags in that
first pfind string (since you put them after in the replace string), 
then you're going to have <tags><tags>pfind<tags>

or did i read this wrong?

cheers
Xavier

[EMAIL PROTECTED] wrote on 17/11/2005 15:28:20:

> Hi all,
> 
> I want to change the colour of a string in some styled text.
> As the string may be any string like "font", "size", etc. that appear 
> in html tags,
> I use the following code that works but I'm not satisfied with it...
> Any more elegant solution?
> Thanks.
> 
>    put the htmlText of fld "Result" into tText
>    -----
>    replace "<font" with numToChar(3) in tText
>    replace "face=" with numToChar(8) in tText
>    replace "size=" with numToChar(9) in tText
>    replace "color=" with numToChar(27) in tText
>    replace "</font>" with numToChar(244) in tText
>    -----
>    replace pFind with numToChar(3) && numToChar(27) & quote \
>       & the uPatternColor of this stack & quote & ">" & pFind \
>       & "</font>" in tText
>    -----
>    replace numToChar(3) with "<font" in tText
>    replace numToChar(8) with "face=" in tText
>    replace numToChar(9) with "size=" in tText
>    replace numToChar(27) with "color=" in tText
>    replace numToChar(244) with "</font>" in tText
>    -----
>    set the htmlText of fld "Result" to tText
> 
> Best Regards from Paris,
> 
> Eric Chatonet.
> ----------------------------------------------------------------
> So Smart Software
> 
> For institutions, companies and associations
> Built-to-order applications: management, multimedia, internet, etc.
> Windows, Mac OS and Linux... With the French touch
> 
> Free plugins and tutorials on my website
> ----------------------------------------------------------------
> Web site        http://www.sosmartsoftware.com/
> Email        [EMAIL PROTECTED]/
> Phone        33 (0)1 43 31 77 62
> Mobile        33 (0)6 20 74 50 86
> ----------------------------------------------------------------
> 
> _______________________________________________
> use-revolution mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution



-----------------------------------------
To make communications with Clearstream easier, Clearstream has
recently changed the email address format to conform with industry
standards. The new format is '[EMAIL PROTECTED]'.

Visit us at http://www.clearstream.com

IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream
International does not accept legal responsibility for the contents of
this message.

The information contained in this e-mail is confidential and may be
legally privileged. It is intended solely for the addressee. If you are
not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful. Any views expressed in this e-mail are
those of the individual sender, except where the sender specifically
states them to be the views of Clearstream International or of any of
its affiliates or subsidiaries.

END OF DISCLAIMER
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to