newObjects-logo.gif (1024 bytes) ScriptManager2 and ScriptAggregate reference
Connect method

Connects the already running script engine(s) to the namespace objects. Script Engine(s) begin to sink events from the named items passed to the script.

variable = object.Connect()

variable boolean true if the operation was successful and false if not. Inspect lastError property for error description.
object ScriptManager2 or ScriptAggregate Previously created ScriptManager2/ScriptAggregate object


Script must run (Run method must be called) before any successful call be made to this method.

After calling the Run method AddEventHandler method can be called to add code that will handle events fired by the named items (and subitems) passed to the script. Then by calling the Connect method engine begins to sink these events (passing them to the corresponding code added by the AddEventHandler code for the event).

Applies to:

ScriptManager2 and ScriptAggregate objects

See also:

C++ Helper SCPHOSTCLNT::Connect method
AddEventHandler method for additional comments

newObjects Copyright newObjects 2001-2005