I have tried :
Code: Select all
set the textColor of fld "Field1" to "green"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
set the textColor of fld "Field1" to "green"
Code: Select all
...
set the textColor of word 2 fld "Field1" to "green"
...
set the textColor of word 22 of line 2 fld "Field1" to "red"
...
set the textColor of char 1 of word 22 of line 2 fld "Field1" to "red"
## char = abbreviation for character
...
set the textColor of word 2 to 4 of fld "Field1" to "green"
...
Code: Select all
...
put wordoffset("test",fld "Field1") into tFoundWordNumber
## ALWAYS check everything!
## 0 means the string is NOT in that field!
if tFoundWordNumber <> 0 then
set the textColor of word tFoundWordNumber fld "Field1" to "green"
end if
...
Code: Select all
// your list of words in a variable or file or whatever, which we'll call 'yourWords'....
repeat with x=1 to the number of yourWords
find yourword x of field "theFieldYourTextIsIn"
set the textColor of word (yourWord x) of field "theFieldYourTextIsIn" to "green"
end repeat