TriggerEventEx

Purpose

This function forces an event to be triggered and is used instead of TriggerEvent when it is necessary to specify phone line information at the same time.

Parameters

Parameter: line
Type: integer
Description: This is the phone line number that you wish the event to have been triggered from.  

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.  

Parameter: voice command (Optional)
Type: string
Description: If the event processes voice commands, you can provide the string of what the recognized voice command would be that you want the event to process.  

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 1, "turn all lights on"
end sub