ARAP provides an ActiveX automation interface for scripting some of ARAP's capabilities from other programs or from the "NO AUTO" version of ARAP.

See Methods and Properties for details.

ActiveX automation can be used from many scripting or programming languages, including VBScript, JScript, Java, Visual Basic, Delphi, etc. The easiest language to use is VBScript.

Here is an example VBScript script (test.vbs) to connect to ARAP and run a script and wait for it to finish.

' create ARAP object

set ARAP=createobject("ARAP.ARAPCOM")


WScript.Sleep 5000        ' wait a few seconds for ARAP to be ready


if ARAP.IsScriptRunning then

WScript.Echo "A script is already running"

else

       ARAP.RunScript "echo", "this is a test"

       Do

       Loop Until not ARAP.IsScriptRunning

       WScript.Echo "Script has completed."

End If


ARAP=nil


' exit successfully

WScript.Quit(0)

To execute the script from a windows command prompt, save it as 'test.vbs' type:

cscript test.vbs