All Tutorials / Jlucben / Synbot Plugin Tutorial - interface to Syn Bot Software

Synbot Plugin Tutorial - interface to Syn Bot Software

Step 6 : Working with SIML Events

SIML Events allows to trigger special evaluation of responses in SIML files

In SIML files you define an event with the EVENT tag

Code:

 [Event]
[Pattern]TEST-EVENT[/Pattern]
[Response]Event Raised.[/Response]
[/Event]


In SIML files , you can trigger the event TEST-EVENT with the RAISE tag :

Code:

[Model]
[Pattern]RAISE EVENT[/Pattern]
[Response]
[Raise]test-event[/Raise]
[/Response]
[/Model]


Response of the bot to user message "Raise event" will be "Event Raised"
Response of the bot will be sent and managed by the plugin as the response to a normal query


Raising SIML events in EZ Builder scripts

You can raise SIML events in EZ Builder scripts :

Code:

Raisebotevent("bot event id")

Or

Code:

$Botevent= "bot event id"
ControlCommand("Synbot plugin", Raiseevent)


Where bot event id is the pattern of the SIML event

Code:

Raisebotevent("test-event")


Will raise the test-event event.
Response of the bot will be "Event Raised"