ActiveX Functions SECTION 6 Functions and Methods
118
6-19-4 ExecuteVBScript
Description
Creates aliases allowing Visual Basic Script to be executed in line. This uses
the Windows Scripting Host. See chapter 5 for a list of supported functions
and details of the Windows Scripting Host.
Syntax
@VBSCRIPT
@ENDSCRIPT
Typical Examples
@VBSCRIPT
OLE1.LEFT = Point("PointName")
@ENDSCRIPT
This Visual Basic Script will write the value from the point 'PointName' into the
property 'Left' of the OLE object 'OLE1'.
6-19-5 ExecuteJScript
Description
Creates aliases allowing Java Script to be executed in line. See Appendix C
for a list of supported functions and details of the Windows Scripting Host.
Syntax
@JSCRIPT
@ENDSCRIPT
Typical Examples
@JSCRIPT
Point("PointName") = OLE_1.Height;
@ENDSCRIPT
This Java Script will write the value of the property 'Height' from the OLE
object 'OLE1' into the Point named 'PointName'.
6-19-6 ExecuteVBScriptFile
Description
Allows Visual Basic script stored in a text file to be executed. This uses the
windows scripting host which must be installed. See chapter 5 for a list of
supported functions.
Syntax
returnstate = ExecuteVBScriptFile(scriptfile)
Remarks
Typical Examples
returnstate = ExecuteVBScriptFile("c:\vbscript.txt")
This will execute the Visual Basic Script stored in "c:\vbscript.txt".
Note: The Java Script can not include the { or } characters. To use these, put the
script in a text file and use the ExecuteJScriptFile function.
Argument Type Description
returnstate bool 1 if the function is successful otherwise 0.
scriptfile Text The name of the file with the Visual Basic Script
to execute.