|
OCRunScript(p_ScriptHost;p_VBScriptCode)
Runs
a piece of VB script code in a script host.
Parameters
| Parameter |
Type |
|
Description |
| p_ScriptHost |
String |
-> |
Script
host name. |
| p_VBScriptCode |
String |
-> |
Script
to run. This must be a text with valid Visual Basic Script code.
|
Return
values
0-if
no error
Other
return values different of 0 represent the system error code of the error that
occurred.
Remarks
You must
create the script host using
OCCreaScriptHost prior calling
OCRunScript.
Example
$i:=OCCreaScriptHost(“test”)
$i:=OCRunScript(“test”,”MsgBox ”+Char(34)+”HELLO”+Char(34)+” “)
$i:=OCDestroyScriptHost(“test”)
Remarks
The objects created in VBScript will not be destroyed by the next calls of the OCRunScript command, they are destroyed only when the script host is destroyed.
See also
OCRunScriptA , Evaluate VBS code from 4D
|