Customization > Automation Interface > Functions > Event Functions > InjectEvent function (automation interface)
InjectEvent function (automation interface)
The InjectEvent function is being deprecated and you should use the InjectEvent2 function instead. The InjectEvent2 function can work with multiple instances. Tell me more...
Syntax:
InjectEvent(<handle to listener dll>,"<event name>")
Where:
<handle to listener dll> is a numeric value that specifies the id of the active listener dll, which is returned by the CreateStateMachine and GetStateMachineHandle functions.
<event name> is a string that specifies the name of the event, which you can get through the GetEventName function.
This function injects the specified event into the state machine and returns a Boolean value to indicate success or failure.
* 
If the event requires parameters, you must specify values for these through the SetParameterCount and SetParameter functions.
Examples
InjectEvent(57980432,"Stop")