Attribute Commands
Sunday, June 18, 2023
Attribute commands will be a particular set of predefined commands that a user can use within an attribute-command script to make final, specific modifications to an attribute's value.
use Command
Sets the attribute to be used with the statements that follow.
By default, the use command is run with the attribute that the command script is written for.
For example, if the command script is written for:
App/Color Dialog/Radio Buttons/Fill/Inactive&Hovered
Then, the following use command will be preprocessed before the script is executed:
use "App/Color Dialog/Radio Buttons/Fill/Inactive&Hovered"
Command Statements
Most command statements will have the following usage format:
component [sub-component, ...] command [parameter, ...]
Consider the following command statement:
color val_f add 0.1
First, remember that the *use* command is processed before the above. That means the attribute the script is written for is marked for use with the statements in the script.
In the above, the script is written for a fill attribute.
'color' refers to a sub-component of the fill attribute.
'val_f' refers to a sub-component of the color component.
'add' is a command that works with the 'val_f' component. It adds the value provided as a parameter to the color's 'val_f'.
'0.1' is the argument provided as the value to add to 'val_f'.