scripting challenge: Large/Smaller text size

Mark Smith mark at maseurope.net
Sat Jul 2 20:38:35 EDT 2005


You win! 140 to 150 on the same machine that I got 157 on (actually, 
150ish to 160ish, 157 was just the last time...)

Mark

On 2 Jul 2005, at 22:29, Malte Brill wrote:

> on changeSize myChange
>   put the htmlText of fld "test" into theHtml
>   set the textSize of fld "test" to \
>         the effective textSize of fld "test"+1
>   replace "size="&quote with "size="&numToChar(1500) in theHTML
>   set the itemdel to numToChar(1500)
>   if the number of items of theHTML<>1 then
>     put 0 into testItem
>     repeat for each item theItem in theHTML
>       add 1 to testItem
>       if testItem<>1 then
>       put offset(quote,theitem) into counter
>       put char 1 to counter-1 of theItem into theSize
>       put theSize+myChange into theSize
>       put theSize into char 1 to counter-1 of theItem
>       put quote&theItem after newHTML
>     else
>       put theItem into newHTML
>         next repeat
>       end if
>     end repeat
>     set the htmlText of fld "test" to newHTML
>   end if
> end ChangeSize




More information about the use-livecode mailing list