Hello Carl_SA,

A couple of things to try:

1. surround the subexpressions with parens:

- Code: Select all
`IfEx "([A] > 0) AND ([A] < 50)" `

SetObjectFill "TextEntry38" "255,128,0" "Solid" "False"

EndIf

2. prefix each variable with "0" just in case [A] is blank.

- Code: Select all
`IfEx "0[A] > 0 AND 0[A] < 50" `

SetObjectFill "TextEntry38" "255,128,0" "Solid" "False"

EndIf

With IfEx "expression" and WhileEx "expression", be careful when writing the "expression". The "rules" for IfEx and WhileEx I have discovered so far are:

1) Anticipate that variables may be empty or blank

By surrounding variables with pseudo-quote characters (A), or by padding variables with constants (B), you can be sure that an empty variable will not cause trouble.

- Code: Select all
`A: IfEx "{[TextEntry1]} = {sam} or {[TextEntry1]}={theresa}"`

B: IfEx "[TextEntry1]XX = samXX or [TextEntry1]XX = theresaXX"

2) Be careful about spaces in IfEx and WhileEx expressions

The following expressions work. Notice the variety of spacings in these commands:

- Code: Select all
`A: IfEx "{[TextEntry1]} = {sam} or {[TextEntry1]}={theresa}"`

B: IfEx "{[TextEntry1]}={sam} or {[TextEntry1]}={theresa}"

C: IfEx "{[TextEntry1]} = {sam} or {[TextEntry1]}={theresa}"

D: IfEx "{[TextEntry1]} = {sam} or {[TextEntry1]}={theresa}"

The following expressions do not work because the joining operator ("or" in these examples) is not separated distinctly from the sub-expressions.

- Code: Select all
`E: IfEx "{[TextEntry1]}={sam}or{[TextEntry1]}={theresa}"`

F: IfEx "{[TextEntry1]}={sam} or{[TextEntry1]}={theresa}"

G: IfEx "{[TextEntry1]}={sam}or {[TextEntry1]}={theresa}"

3) Double-quotes are necessary when a comparison item contains spaces

Neobook's help file states that when "a comparison item contains spaces, then it must be surrounded with quotes." That is, instead of writing this:

- Code: Select all
`IfEx "{[value]} = {one two} or {[value]} = {three four}"`

you should write this:

- Code: Select all
`IfEx "{[value]} = [#34]{one two}[#34] or {[value]} = [#34]{three four}[#34]"`

The explict quotes [#34] alert the IfEx parser to the boundaries of the expression to be compared.