Colorize Script

MisterX b.xavier at internet.lu
Wed Apr 14 14:32:49 EDT 2004


repeat for each item w in thislanguagekeywords
  put length(w) into wlen
  put 0 into lasta
  repeat
    put offset(w, xscript,lasta) into a
    if a<1 then exit repeat
    add lasta to a
    set the textcolor of char a to a+wlen to colorchar[w]
    put a into lasta
  end repeat
end repeat

I'll let you figure out the rest...
The colorize script in the original editor (or RR's) is not
complete or handles all script conditions, this repeat is not faster but
more complete. Slows down around 5000 words and 100 keywords...



> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com]On Behalf Of
> FlexibleLearning at aol.com
> Sent: Wednesday, April 14, 2004 17:05
> To: use-revolution at lists.runrev.com
> Subject: Re: Re: Colorize Script
>
>
> >> Script colorization is available in The Scripter's Scrapbook for 7
> >>languages including HTM, Director, JavaScript, MC/RR, AppleScript...
>
> >I downloaded the stack and looked through it and I can't find any scripts
> >that demonstrate how to setup a colorizer much like the one in MC/RR.
> >
> >Derek Bump
>
>
> The Scripter's Scrapbook will colorize selected text for you if
> you choose
> 'Colorize' from the 'Entries' menu. If you need to roll your own,
> look at the mc
> script which should give you a good starting point.
>
> /H
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list