Programming Guide (JScript)



Yüklə 6,96 Mb.
Pdf görüntüsü
səhifə16/22
tarix07.11.2018
ölçüsü6,96 Mb.
#78683
1   ...   12   13   14   15   16   17   18   19   ...   22

62
2.  
3.  
4.  
Select the 
 tab on the left ( ). The list of system objects is displayed here.
DDI
1
In the 
 tab, select the object which events and reactions are to be viewed ( ).
DDI
2
To view the name of the selected object, go to the 
 tab ( ).
Names
3


63
5.  To view the list of events for the selected object, go to the 
 tab.
Events


64
6.  To view the list of reactions for the selected object, go to the 
 tab.
Reactions
The detailed information on working with ddi.exe tool is given in 
.
Administrator's guide
Creating, saving and deleting scripts
Creating a script
To create a JScript script in Intellect, the 
 utility is used.
Editor-Debugger_Script'>Editor-Debugger
Note.
If the Sensor is armed, then at the Sensor switching on/off the "Alarm" event appears depending on the alarm mode setting (see the 
Creating and configuring the Sensor 
 section of the 
). If the Sensor is disarmed, the "Closed" / "Opened" events appear correspondingly.
system object
Installing and configuring security system components guide


65
1.  
2.  
3.  
4.  
5.  
To start the utility, click the 
 button in the 
 object settings panel.
Editor-Debugger
Script
To create a script, do the following:
In the 
 tab of the 
 window, create a 
 object. Enter the identification number and the name for the script.
Programming
System Settings
Script
Select the time limits for running the script in the 
 field (for example, the 
 zone).
Time Zone
Always
In the 
 field, select the computers (kernels) where the script should run.
Computers
Click the 
 button in the bottom of the 
 settings panel to open the 
utility.
Editor-Debugger
Script
Editor-Debugger 
In the 
 utility window, open the 
 list and select the 
 object to be edited (for example, Script 2).
Editor-Debugger
Script Debug/Edit
Script
Note
By default, the 
 time zone is selected
Never
Note
By default, the script will run on all computers. The list shows only the computers registered in the Hardware tab of the System Settings window
Note
Use the 
 utility to create, edit and save scripts in JScript. The text of saved script available to be edited is saved on the setting panel of the 
 
Editor-Debugger
Script
object.


66
5.  
6.  
7.  
Enter the text of the script in JScript programming language into the 
 field.
Script
Run the script using a test event. To create a test event, select the
 in the 
 menu. The Test message window will open allowing to set the test 
 Edit test event
Debug and edit
event parameters. 


67
7.  
1.  
To run the script using the test event, select Test run in the Debug and Edit menu.
Check the script syntax using the interpreter which is built-in into the Editor-Debugger utility. The verification results showing the error and its location will be displayed in the 
debugger window of this script in the Script messages list. Correct the script to eliminate the error and repeat the verification.


68
1.  
2.  
1.  
2.  
3.  
4.  
5.  
After debugging the script using the 
 utility, run it with a real event. Check the result. If the result is incorrect, change it and run again.
Editor-Debugger
Script creation is considered complete if it runs correctly.
Saving a script
The 
 utility provides two options for saving scripts – in a 
 object, or in a text file on the hard drive.
Editor-Debugger
Script
To save the script in the 
 object, in the 
 menu, select
.
Script
File
 Save in the database
To save the script in the file, in the
 menu, select 
.  To open a script saved in a file in the 
 utility, in the 
 menu, select 

 File
Save on disk
Editor-Debugger
File
Open from disk
Deleting a script
To delete a script created in the 
 system, delete the corresponding 
 object in the 
 tab.
Intellect
Script
Programming
Creating your first script
As an example of using JScript in 
, try to create a script for the following tasks: when Macro 1 starts, set the value 10 to the 
 parameter for Cameras  № 1 – 4 
Intellect
Hot Recording
and output the 
 message to the debugger window of the 
 utility.
Hello world
Editor-Debugger
To create and run this script, do the following:
In the
 tab of the 
 window, create four 
 objects with identification numbers 1, 2, 3 and 4, if they have not been created before.
 Hardware
System Settings
Camera
In the 
 tab, create a 
 object with identification number 1. The Events table should not be filled for .
Programming
Macro
Create a 
 object in the 
 tab. Enter the identification number 1 and the name 
.
Script
Programming
Script 1
In the 
 object settings panel, select 
 in the Time zone list.
Script 1
Always
Click the 
 button at the bottom of the 
 settings panel. The 
 window will open.
Editor-Debugger
Script 1
Editor-Debugger
Note
 See the detailed information about using test events for script debugging in the 
 section
Script Debugging
Note
 The script is automatically saved in the corresponding 
 object upon closing the 
 utility
Script
Editor-Debugger


Yüklə 6,96 Mb.

Dostları ilə paylaş:
1   ...   12   13   14   15   16   17   18   19   ...   22




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə