Go to documentation repository
Previous page Next page
Example 1. On macro 1, change the status of the Alarm event on camera 1 to Completed.
OnEvent("MACRO","1","RUN")
{
DoReactStr("INC_SERVER","1","UPDATE_STATUS","status<3>,objtypes<CAM>,objids<1>,actions<MD_START>");
}
Example 2. On macro 2, on Incident server 1, change the status of the event escalation of camera 1 to Waiting for processing (not escalated).
if (Event.SourceType == "MACRO" && Event.SourceId == 2 && Event.Action == "RUN")
{
DoReactStr("INC_SERVER","1","UPDATE_ESCALATE_STATUS","escalated<0>,objtypes<CAM>,objids<1>");
}
Example 3. Changing the event status of the Incident manager module
When you work with the objects of the Incident manager module, you can change the event status of an object (see Event handling). To change the event status of an object, you can use the JScript script.
Example. On macro 3, change the status of the Alarm event on camera 1 or 2 to Completed.
if (Event.SourceType == "MACRO" && Event.SourceId == 3 && Event.Action == "RUN")
{
DoReactStr("INC_SERVER","1","UPDATE_STATUS","status<3>,objtypes<CAM>,objids<1|2>,actions<MD_START|MD_START>");
};
Example 4. Changing the event priority of the Incident manager module
When you work with the objects of the Incident manager module, you can change the priority of the object event (see Setting the events priority) using the JScript script.
Example. On macro 1, set the 1 value for the numerical priority of the priority<1> event that is determined by the settings of the corresponding incident manager. In the settings, you can specify the objtypes<CAM> filter by the object type, the objids<1|2|3> by the object ID, and the actions<MD_START|MD_STOP|ATTACH> by the event type, as well as the timestamp<>, by the date in the ISO 8601 format (timestamp<2025-12-05T00:00:00.000>) to exclude events that came earlier than this time.
if (Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN")
{
DoReactStr("INC_SERVER","1","UPDATE_PRIORITY","priority<1>,objtypes<CAM>,objids<1|2|3>,actions<MD_START|MD_STOP|ATTACH|DETACH>,timestamp<2025-12-16T09:00:00.000>");
};