Versions Compared

Key

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

...

The settings panel allows choosing the time zone and the computers (kernels) for executing the script.

Info
titleNote.

To set all checkboxes checked select one in the column and click Ctrl+A. To set all checkboxes unchecked select one and click Shift+A.

It also has the button for starting the Editor-Debugger tool and the text window for viewing the script text created by means of this tool. The scripts can be edited in the Editor-Debugger tool or directly in the settings panel for the Script object.

...

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

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

script can be used instead of 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 is to be started when controlling PTZ device in the Video surveillance monitor.

For this adjust the Script object as follows:

  1. Select the required time zone when the script is to be executed.
  2. Enter the script text:
    Image Added
  3. Adjust the filter as follows:
    1. Select CORE in the Object’s type dropdown list.
    2. Enter DO_REACT in the Event field.

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

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>");