scripting challenge: Large/Smaller text size
Malte Brill
revolution at derbrill.de
Sat Jul 2 05:05:15 EDT 2005
Minor correction:
on mouseUp
put the htmlText of fld 1 into theHtml
replace "size=""e with "size="&numtoChar(1500) in theHTML
set the itemdel to numToChar(1500)
if the number of items of theHTML<>1 then
put 0 into itemCount
repeat for each item theItem in theHTML
add 1 to itemCount
if itemCount=1 then
put theItem into newHTML
next repeat
end if
put 1 into counter
if ">" is in theItem then
repeat forever
add 1 to counter
if char counter of theItem=quote then exit repeat
end repeat
put char 1 to counter-1 of theItem into theSize
put theSize+1 into theSize
put theSize into char 1 to counter-1 of theItem
end if
put quote&theItem after newHTML
end repeat
set the htmlText of fld "test" to newHTML
end if
set the textSize of fld "test" to \
the effective textSize of fld "test"+1
end mouseUp
More information about the use-livecode
mailing list