|
Script |
Top Previous Next |
|
Script Object
Parameters used in the custom function: script.parameterList[] -- Used to access a number parameter script.stringParameterList[] -- Used to access a string parameter script.parameterCount -- The count of number parameters passed into the custom function script.stringParameterCount -- The count of string parameters passed into the custom function script.seriesParameterCount -- The count of series parameters passed into the custom function
Parameters used after a call to a custom function from the calling script: script.returnValue -- Used to access the number return value script.stringReturnValue -- Used to access the string return value script.returnValueList[] -- Used to access the list of returned number values
Functions used in the custom function: script.SetReturnValue( value or string value, or value and string value ) -- Used to set the return value to a number or string script.SetReturnValueList( value1, value2, value3... ) -- Used to set a list of number return values. script.GetSeriesValue( seriesParameterIndex, offsetIndex ) -- Used to access a value from a passed in series. Access is as defined for the series so that auto indexed series are offset based, and non auto indexed series are manual direct index based.
Used to call the custom function using the script name, and pass a list of parameters. Parameters can be numbers, strings, or series. script.Execute( scriptName, [parameterlist...] ) Note that parameter list will be parsed into parameterList[] or stringParameterList[] or the series parameter list, based on type)
Example:
Create a custom script named "Multiply Two Numbers" with the following code: script.SetReturnValue( script.parameterList[1] * script.parameterList[2] )
Call this new script from another script or block: PRINT script.Execute( "Multiply Two Numbers", 7, 8 )
See Custom User Functions for more information |