Data type: scriptable

Data type: scriptable


Many style properties are scriptable; their value can be changed by a script.

Consider for example:

left: 123

This defines that the left coordinate of a field is 123 pixels. To script this you can write:

left: { if == "" then 100 else 123 }

Now the left position depends on whether or not the name is empty.

File syntax

A 'scriptable something' can take three forms:

  1. It can be a regular 'something'
    something: 123
  2. It can be a script that produces 'something', enclosed in curly braces:
    something: {100 + 23}
  3. It can be a script that produces 'something', indented and preceded by script::
    	script: 100 + 23

Note: To use a multiline script the following does not work:

something: { 100 +
             23 }

If the script has multiple lines, it must start on a new line, and be indented with a TAB:

	{ 100 +
	  23 }


	script: 100 +