Oh Christ... Image Name?

Jim Ault JimAultWins at yahoo.com
Tue Dec 13 13:29:53 EST 2005


On 12/13/05 3:43 AM, "Jerry Muelver" <jerry at hytext.com> wrote:
> How about putting the HTMLtext of the whole line into a variable, then
> parsing the variable for a "<img src=" chunk to pick out a possible
> imageSource identifier?
> 
Yes, Jerry, interesting to have 3 versions of the same string, eh.
ver 1 = the htmlText which includes tags
ver 2 = the visible chars in the field wrapped according to the fld
rectangle
ver 3 = the text of the fld which is all the ASCII chars without tags.
----- script lines -----------
put "Christmas is this month" into fld displayString
put the text of fld displayString into line 1 of tHolder
--Christmas is this month
put the htmltext of fld displayString into line 2 of tHolder
--<p>Christmas is this month</p>
set the imagesource of char 3 of fld displayString to "12x12BallGreen.png"

put the text of fld displayString into line 3 of tHolder
--Christmas is this month
put the htmltext of fld displayString into line 4 of tHolder
--<p>Ch<img src="12x12BallGreen.png">istmas is this month</p>

set the imagesource of char 3 of fld displayString to ""
put the text of fld displayString into line 5 of tHolder
--Christmas is this month
put the htmltext of fld displayString into line 6 of tHolder
--<p>Christmas is this month</p>

put tHolder
-----------------
Result is
Christmas is this month
<p>Christmas is this month</p>
Christmas is this month
<p>Ch<img src="12x12BallGreen.png">istmas is this month</p>
Christmas is this month
<p>Christmas is this month</p>

** Note that the htmlText version is missing the 'r' if there is an
imageSource.

Jim Ault
Las Vegas


> ---- Jerry Muelver
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list