Util.LoadScript() Method

Loads a script fom the given file, sets default language for the script. Mainly useful to an external automation controller which is running a script remotely.

Syntax

Util.LoadScript(FileName)

The method syntax has these parts:

Part Description
FileName (String) script file pathname
Return (Nothing) Does not return a value.

Remarks

Loads a script into the ACP scripting engine, and also sets the ScriptLanguage property according to the file's extension as shown below: Mainly useful to an external automation controller which is running a script remotely.

If an external automation controller (such as Excel) loads a script whose file name does not end in a recognizeable extension (such as .vbs, .js, etc.) then it is required that the controller set the proper language for the script using this property before starting the script. See the ScriptLanguage() property. The following table lists names of the languages supported in this release of ACP:
Ext Name Language
.VBS VBScript Microsoft Visual Basic, Scripting Edition
.JS JScript Microsoft JScript (JavaScript approximation)
.PLS PerlScript Perl 5 as an ActiveX Scripting language
.PYS Python Python as an ActiveX Scripting language

Note: The language must be installed on your system. In particular, PerlScript and Python are not part of the standard set of languages supplied with ACP. For additional info see the Scripting Guide info on other languages.