is it possible to change the background color
of a text box(preferable) or button or field
with a script
You could use conditional formatting and set a variable or global field that triggers the change in background color through the conditional formatting.
You might have a conditional format formula such as:
$$Color = True
Then a script that does:
Set Variable [$$Color ; value: True ]
Refresh Object [Put object's object name here]
Should do the trick. Use the Inspector's Name box on the position tab (ruler icon) to give an object an object name.
On old method (before CF and Themes were introduced) was to store patches of different colours in a reading container field, the set a container field of the same size directly behind a transparent field and populate that by script or calc with the global field repetition of the colour you want.
Retrieving data ...