Transferring htmlText via a chunk descriptor

Scott Rossi scott at
Fri Feb 25 03:03:11 CST 2005

Recently, Mark Swindell  wrote:

>>> What would the correct syntax be to achieve the following...
>>> I have a section of formatted text in a field on card 2 that I want
>>> exported to another field on card 1.  The line I want to execute is
>>> something like the following:
>>> set the htmlText of field "originalText" of cd 1 to
>>> value(linesToShow)
>>> ...where linesToShow = (line 2 to 10 of field 1 of cd 2)
>>  put the HTMLtext of line 2 to 10 of fld 1 of cd 2 into tData
>>  set the HTMLtext of fld "originalText" of cd 1 to tData

> Can this same thing be accomplished without naming the
> chunk explicitly, as in... the HTMLText of value(linesToShow)...?
> (That didn't seem to work, which is why I asked the list.)

If I understand you correctly, you could do it like this:

 put "line 2 to 10 of field 1 of cd 2" into linesToShow
 set the HTMLtext of fld "originalText" of cd 1 to \
     the HTMLtext of linesToShow


Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
E: scott at

More information about the use-livecode mailing list