ScriptModule Properties

AsObject as Object

[Read only] Gets module code as object. For example if your script has function called as "MyFunction" - you can call it like this:

MyValue = ScriptModule.AsObject.MyFunction.

Events as ScriptModuleEvents

[Read only] Gets associated ScriptModuleEvents object.

ScriptLanguage as String

Get or set scripting language registered in the system. By default "VBScript".

Note: if this property changed - you must set Text property again (previous settled Text removed)!

Text as String

Get or set script code.

LastError as Variant

[Read only] Gets last occurred error code and error text.

Returned value represented as array of 2 elements.

First element contains error code, second - error text.

If first element equal to 0 - no errors occurred.

If first element NOT equal to 0 - then second element contains error text (description).

With this property you can detect if any errors appeared at script execution or at event calls.

Note: all scripts errors also sended to the system event log.

Name as String

Get or set Name of module. Must be unique and can't be empty.

Descripton as String

Get or set module description.