Go to documentation repository
...
| Code Block | ||
|---|---|---|
| ||
if(Event.GetSourceType() == "MACRO" && Event.GetAction() == "RUN")
{
var k;
//Switching the cameras to the Day mode by arming the *.1 detection zones
if(Event.GetSourceId() == "1")
{
for (k = 1; k<= 4; k = k+1)
{
DoReactStr("CAM_ZONE", k + ".1", "ARM", "");
DoReactStr("CAM_ZONE", k + ".2", "DISARM", "");
DoReactStr("CAM_ZONE", k + ".3", "DISARM", "");
}
}
//Switching the cameras to the Nigh mode by arming the *.2 detection zones
if(Event.GetSourceId() == "2")
{
for (k = 1; k<= 4; k = k+1)
{
DoReactStr("CAM_ZONE", k + ".1", "DISARM", "");
DoReactStr("CAM_ZONE", k + ".2", "ARM", "");
DoReactStr("CAM_ZONE", k + ".3", "DISARM", "");
}
}
//Switching the cameras to the Rain mode by arming the *.3 detection zones
if(Event.GetSourceId() == "3")
{
for (k = 1; k<= 4; k = k+1)
{
DoReactStr("CAM_ZONE", k + ".1", "DISARM", "");
DoReactStr("CAM_ZONE", k + ".2", "DISARM", "");
DoReactStr("CAM_ZONE", k + ".3", "ARM", "");
}
}
} |