variable = object.Start(lang, script [, wait])
lang - String. The name of the language in which is the
script code. For example "VBScript", "JScript",
script - String. The script source code.
wait - optional Positive integer. Timeout in milliseconds
to wait for the script to complete the initialization. See the
If the wait is omitted or 0 the method will start the thread and
return immediately. If the wait is greater then 0 the Start will wait
the script to execute. This should not be used if all the work the
thread does is implemented for linear execution, but if the script is
designed to initialize and then the application will request actions
through the Execute
method it is reasonable to wait for the initial startup to complete.
We recommend at least 5 seconds for scripts that initialize only
internal simple variables and at least 30 seconds for scripts that
need to initialize external objects (for example opening data bases
If the wait is greater than 0 and the script failed to initialize
within the specified timeout the thread is terminated.
If a script error has been occurred during the initialization the
method will return False which means that the execution has been
started but failed. After a failure you can check the LastError
Applies to: COMScriptThread