Adding a Script

<< Click to Display Table of Contents >>

 

Adding a Script

To add a script to an object, follow these steps:

1.Select the object to create the script and then click the Scripts tab.

Scripts tab

Scripts tab

2.Click Script Script. The Scripts Editor is then opened, according to the next figure.

Adding a script to an object

Adding a script to an object

3.Type the VBScript commands in the text-editing box.

 

NOTE

Use the underline character to add a line break, thus making code more legible. The underline character indicates that code continues on the next line.

 

For example:

If intBoilerTemperature3 > 120 and _
  intBoilerTemperature4 > 120 Then
  bSendAlarm = True
  bAlarmOn = True
End If

 

Each event can have several scripts and Picks linked to it, called Event Actions. The list of actions can be seen on the upper side of the scripts editing window. Each object can have any number of events with linked scripts or Picks.

 

NOTE

When right-clicking any of these actions described previously, a contextual menu with options to cut, copy, and paste scripts and Picks among events is then opened.

Was this page useful?