RunScript Method

Runs the specified Newlook script then continues execution of the current script.

Client support

   Newlook Smartclient

   Newlook Server

Version Support

Introduced in Version 10.7 (Newlook Server API).

Introduced in Version 11.0 (Scripting support).

Syntax

App.RunScript(ScriptName[, FunctionName], [Arguments])

The RunScript method syntax has these parameters:

Part

Description

ScriptName

String specifying the script to run. The script's name should be specified in quotation marks.

FunctionName

Optional. String specifying the function to execute. The function's name should be specified in quotation marks.

Arguments

Optional. Array of arguments to be passed to the script. The array can contain values of the type string, integer, double or boolean.

Arguments can be specified as a JScript array ("TestScript", "TestFunction", [arg1, arg2, arg3, ...]), or as a comma-separated list of arguments ("TestScript", "TestFunction", 1, 2, 3).

Use

Use this method if you wish to call a script using the Newlook API or from a different script.

TIP

This method is the Web API equivalent of 'WebServices' for SOAP.

The RunScript method is typically used if you want to send data to another Newlook script as function parameters and get data back as function return values.

ALERT

This method should not be used to call a function that exists within the calling script. If you are wanting to call a function within the current script reference it explicitly.

Returns

This method returns, on success, the return value of the called function. For instance, if the function returns an integer, then RunScript will return an integer.

Applies To

App object

See Also

RunMacro method | GoToMacro Action