Specifications

Chapter 10. Case Studies
' Load an SMTP Channel, change some properties and save it
Set objChannel = CreateObject( "AxSmsServer.SmtpChannel" )
objChannel.Load( 4001 )
WScript.Echo "Load, result: " & objChannel.LastError
If( objChannel.LastError = 0 ) Then
objChannel.Host = "pop3.myserver.com"
objChannel.Save
WScript.Echo "Save, result: " & objChannel.LastError
End If
9.11. ‘Triggers’ collection object
Properties:
Property Type R/W Description
LastError Number R Completion code of the last called function
Functions:
Function Parameters Description
FindFirstTrigger Filter (String) Find the first Trigger in the database.
Optionally specify a filter (SQL-like
notation)
FindNextTrigger None Find the next Trigger
Create None Create a new Trigger. A new Trigger object
is returned.
Sample:
' Sample: list all triggers; then, create a new trigger
Option Explicit
Option Explicit
Dim colScripts, objScript
Set colScripts = CreateObject( "AxSmsServer.Triggers" )
Set objScript = colScripts.FindFirstTrigger( "" )
While colTriggers.LastError = 0
PrintTrigger( objTrigger )
Set objTrigger = colTriggers.FindNextTrigger
Wend
Set objScript = colScripts.Create()
objScript.Description = "My new trigger"
...
WScript.Echo "Ready."
' /////////////////////////////////////////////////////////////////////////////////////