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: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> [EMAIL PROTECTED]
> Sent: Wednesday, April 14, 2004 17:05
> To: [EMAIL PROTECTED]
> 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
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to