Ole4D Methods

OCRunScriptA(p_ScriptHost;p_Array)


Runs the script that results from concatenating elements of a text array. This method was introduced to remove the 32000 characters limitation of method OCRunScript .

Parameters
Parameter Type   Description
p_ScriptHost String -> Script host name.
p_Array Array Text -> Script to run. The result concatenating its elements must form a valid Visual Basic Script code.



Return values
0 – The method call was successful.
If the method call was not successful the return value is non zero. For more information call OCLastError.

Example
$i:=OCCreaScriptHost(“test”)
ARRAY TEXT (a;2)
a{1}:=”Msg”
a{2}:=”Box 1”
` show a message box with message “1” from VBS
$i:=OCRunScriptA(“test”, a)
$i:=OCDestroyScriptHost(“test”)


Remarks
The objects created in VBScript will not be destroyed by the next calls of the OCRunScriptA command, they are destroyed only when the script host is destroyed.


See Also
OCRunScript , Evaluate VBS code from 4D