|
Contents | Previous | Next | Subchapters |
| Syntax |
status = OMServer.IsBusy() |
| See Also | open |
1 if O-Matrix is busy, and 0 otherwise.
COM\scripts
directory of the O-Matrix distribution.
' IsBusy.vbs
' This example illustrates usage of the .IsBusy() O-Matrix COM server method
' usage: cscript IsBusy.vbs
' O-Matrix must be running before running this script
' Instantiate the O-Matrix COM Server
set OM =CreateObject("OMatrixServer.OMServer")
status = OM.Open
If status <> 1 Then
WScript.Echo("Error connecting to O-Matrix")
End If
If status = 1 Then
status = OM.Eval("clear")
WScript.Echo("Execute a long-running command in O-Matrix...")
status = OM.Eval("for i=1 to 100 begin print i; x=rand(2000,2000); end")
' Query O-Matrix with IsBusy() until it is not busy
status = OM.IsBusy()
WScript.Echo("OM.IsBusy() == " & status)
Do While status = 1
status = OM.IsBusy()
WScript.Echo("OM.IsBusy() == " & status)
Loop
WScript.Echo("OM.Eval complete")
End If
MsgBox("IsBusy.vbs VBScript Complete")