TriggerEvent

Purpose

This function forces an event to be triggered.

Parameters

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.  

Returns

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.

Example

'Trigger the event named "turn all lights on"

sub main()
hs.TriggerEvent "turn all lights on"
end sub