154 Working with Macros
FXDeko User’s Guide
An object parameter specifies an object, a collection of values that is treated as
a single item. Typical objects in FXDeko include colors, shaders, ellipses,
rectangles, boxes, fonts and looks.
The letter command, which adds a letter to a text field, includes two object
parameters, font and look:
letter [character=] [font=] [look=] [tx=]\
[ty=] [code=] [insert=] [-show] [-attach]
The font parameter specifies an object created by the font command, and the
look parameter specifies an object created by the look command.
You create an object with a command. For example, the rgb command creates a
color object:
rgb red= green= blue=
The elements of an object correspond exactly with the of the command that
created it. The parameters of the rgb command represent the amounts of red,
blue and green that make up the color.
You can assign an object to a variable:
$gold = rgb 100 100 0
You can specify an object parameter with an embedded command, using
parentheses:
ramp top_left=(rgb 60 60 0)
Accessing Object ElementsTo access an element to edit its value or to assign it to a variable for use
elsewhere, use the element operator.
To edit $gold to re-specify the amount of green:
$gold:green = 80
To assign the green element of $gold to the variable $grn:
$grn = $gold:green
List
A list parameter, also known as a repeating parameter, specifies a list of one or
more values. Depending on the command, the values on the list may or may not
be of the same type. A command can have no more than one list parameter,
which is usually the last parameter.
The message command has a list parameter that specifies a list of
strings to output on the Status Bar:
message list=
message "Enter" "file" "name" "of" $song