Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The settings panel of the Script system object is shown in the figure below:

Image Modified

Note
titleAttention!

Creating of large number of the Script objects (more than 100) can cause system instability.

The settings panel of the Script system object allows choosing the time zone schedules and the computers (kernels) for executing the script.

...

Info
titleExample.

If the Object’s type column has the Macro value, the Identifier column has the 1 value and the Event column has the Executed value, then instead of the script below

Code Block
languagejavascript
if (Event.SourceType == "MACRO" && Event.SourceId==1 && Event.Action == "RUN")
{
    DoReactStr("CAM", "2", "REC", "");
}

you can use the following script:

Code Block
languagejavascript
DoReactStr("CAM", "2", "REC", "");

The detailed information on the elements of the settings panel for the Script object is given in Administrator's guide.

...

Info
titleExample.

Recording on Camera 1 must be started when controlling the PTZ camera in the Video surveillance monitor.

For this, configure the Script object as follows:

  1. Select the required time schedule when the script must be executed.
  2. Enter the script text:
    Code Block
    if (Event.GetParam("source_type") == "TELEMETRY") {
      DoReactStr ("CAM","1","REC","");
    }
  3. Configure the filter as follows:
    1. From the Object’s type drop-down list, select CORE.
    2. In the Event field, enter DO_REACT.

Image Modified

The filter can be set by the UPDATE_OBJECT event of the CORE object. Example of the command to add the Camera object with identifier 1 to the filter of the Script object with identifier 2:

Code Block
NotifyEventStr("CORE","","UPDATE_OBJECT","objtype<SCRIPT>,objid<2>,EVENT.objid.0<1>,EVENT.objid.1<10>,EVENT.action.count<2>,flags<>,EVENT.action.0<>,EVENT.action.1<>,EVENT.objtype.0<CAM>,EVENT.objtype.count<2>,EVENT.objtype.1<CAM>,EVENT.objid.count<2>");