The SMEvent Object |
Top Previous Next |
The SMEvent object is a global Commando Script object. There is only one method in the SMEvent object.
Method: Raise(strEventName, strEventData)
Example: SMEvent.Raise "TRACE", "This will show up in the processor trace list"
Parameters: (2)
strEventName is a string and must contain certain values (see below). strEventData is also a string and contain any string data you like.
The strEventName Parameter can contain only one of 3 different values. Any other values will be ignored by the Commando Processor (values are NOT case sensitive):
1: "TRACE" - Will cause the value passed in strEventData to show in the processor trace listing. 2: "ERROR" - The value passed in strEventData is shown in a Message Box and the processor script will halt. 3: "CANCEL" - The value passed in strEventData is shown in the processor trace listing and the processor script will halt.
In your Commando Processor scripts use the SMEvent object to create output to the trace listing in the Processor Runtime window like so:
Example: Dim sBuff sBuff = "This will show up in the trace listing of the processor window" SMEvent.Raise "TRACE", sBuff
For an error condition:
If Not oMSG.OpenVendorByName("Default", "2.3") Then SMEvent.Raise "ERROR", "Error opening vendor" Exit Sub End If
|