The SMDebug Object

Top  Previous  Next

The SMDebug object is a global Commando Script object.  It contains only two public methods: Echo() and Alert().  Any calls to the Echo() method are ignored unless you are in the Commando Script debugging window, while calls to the 'Alert' method will always generate a message box (effectively halting your script until someone clicks 'Ok').

 

Method: Echo(varEventData)

Parameters: (1)

 

Description: The Echo() method causes varEventData to be displayed in the Debugger Output window.

 

Example:

Dim xVar

SMDebug.Echo "This will show up in the debug window"

xVar = Now

SMDebug.Echo xVar

If Err.Number <> 0 Then

  SMDebug.Echo Err

End If

 

Method: Alert(strAlertMsg, OPTIONAL strAlertTitle)

Parameters: (2)

 

Description: The Alert() method will generate a message box at runtime.

 

Example:

 

SMDebug.Alert "Hello There", "My Message Title"