getting style information from text

James Hale james at thehales.id.au
Sat Nov 29 22:18:21 EST 2008


Hi,

I want to process some styled text to set actions depending of the  
style of the text.

I have the text currently in a field and having placed it there by the  
following code snippet:

   set the RTFText of field "thetext" to the URL thepath

This works fine and places the styled text in the field.

I now want to go through this text, line by line, and depending on  
whether the line is bold or not and do one thing or another.

I can do this using another field "targettext" by placing the RTFText  
of each line in turn into this field and then checking the "textstyle"  
of the field's contents.

My question is, can I do this using a variable instead of this second  
field "targettext".

It seems that when I use a variable instead of the field, the actual  
text placed in the variable is the raw RTF and thus the "textsyle"  
property makes no sense.

So I guess I am asking if, in order to act on the style (bold or  
plain) of the text I wish to process, am I restricted to using fields  
as my containers.


James Hale

james at thehales.id.au

Tel: +61 3 9386 2516
Fax: +61 3 9386 1387






More information about the use-livecode mailing list