This function forces an event to be triggered and does not return until the event has completed.
Parameter: name
Type: string
Description: This is the name of the event you want to trigger. The
actions for the event are executed. Note
that the name is not case-sensitive. For
instance, the events "Evening" and "evening" would
be considered the same.
If there were duplicate event names, only the first one found would run.
Return value: status
Type: integer
Description: This is 0 if there was
an error or 1 if there was no error. If
an error is detected, then an error message is written to the event log.
Trigger the event named "turn all lights on" using a VB.NET script.
Sub Main(ByVal Parms as Object)
iReturn = hs.TriggerEventAndWait("turn
all lights on")
If iReturn = 0 Then
hs.WriteLog("Error","There
was an error triggering the event: Turn All Lights On")
End If
End Sub