On 3/13/05 11:30 PM, "Kevin J" <[EMAIL PROTECTED]> wrote: > Ok I was trying every thing that I could think of to get this to work. > I was reading all the docs to see if I could figure it out but its not > working. What I am trying to do is when someone types in the word > "while" into the field"txtWindow" it will set that word to the color > blue but all the other words will stay black. I can't figure it out > for the life of me. Is there something that I can download to look at > that as somthing almost the same?
Kevin, Here you go - fully tested and genericized so you can do other words as well. This also works if they move the insertion point somehere else in the field and type "while". Put this in the field: (watch for line breaks) on rawKeyUp put "while" into tBlueWord put length(tBlueWord)-1 into tLen put word 4 of the selectedChunk into tCharNum if char (tCharNum-tLen) to tCharNum of me is tBlueWord then set the textColor of char (tCharNum-tLen) to tCharNum of me to blue else set the textColor of char tCharNum of me to black end if end rawKeyUp HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution