
MediaScript Objects and Methods 167
•
•
•
•
getScriptFileName()
Returns the current filename for this running script.
Syntax
getScriptFileName();
print()
Depending on the platform, prints the specified string to the command prompt (MS
Windows) or to MediaScript log (Mac OS).
Syntax
print (<"string">);
rgb()
Converts the three supplied RGB color values into a 24-bit value (0 - 16,777,215) that is
suitable for many Media() graphic operation arguments.
Syntax
rgb (<red>,<green>,<blue>);
RgbColor Object
This object is constructed from a 24-bit value. It splits the color into red, green, and blue
components.
Constructor
RgbColor(value) - returns an RgbColor object constructed from value.
Properties
.red - the red component (read or write). Valid values range from 0 to 255.
.green - the green component (read or write). Valid values range from 0 to 255.
.blue - the blue component (read or write). Valid values range from 0 to 255.
Methods
valueOf() - converts the red, green, and blue components back to a 24-bit value.
toString() - returns string representation of 24-bit value.
Functions
RgbColorFromRGB(red, green, blue) - constructs RgbColor from the components.
RgbColorFromPct(red, green, blue) - constructs RgbColor from component
percentages (0-1).