Topic 6.2.7: ActiveX Event Scripts

Configuring ActiveX Event Scripts

  • Use ActiveX event scripts to run a script when an ActiveX event occurs. Depending on the ActiveX control, such events can include:
    • ActiveX control is started: Startup
    • ActiveX control is closed: Shutdown
    • User clicks on ActiveX control: Click
    • User double-clicks on ActiveX control: Doubleclick
  • An ActiveX event script is identified by a name. By default, the InTouch HMI automatically adds the control name and event that the script is associated with. For example: MyActiveXScript (AlarmViewerCtrl1::Click).

To configure a new ActiveX event script

1. Double-click on the ActiveX control to configure. The ActiveX control properties dialog box appears.\

2. Click the Events tab.

3. Select an event such as click, double-click, shut down, or start up.

4. Click in the Scripts cell for that event. Square brackets appear.

5. Type in a new name for an event script and click OK. When a message appears, click OK to create a new script. The ActiveX Event                 Scripts dialog box appears.

6. In the Name box, you can make changes to the ActiveX event script name.

7. Type your script in the window.

8. Click OK.

To edit an existing ActiveX event script

1. Using the Classic View, in the Scripts pane, expand ActiveX Event, right-click the ActiveX script name and click Edit. The ActiveX Event      Scripts dialog box appears.

2. Make any necessary changes to the script and click OK.

To delete an existing ActiveX event script

1. Make sure that no ActiveX controls are using the ActiveX event script to delete. If there are ActiveX controls using the script, do the following first:

a. Remove the ActiveX event script references in the Events panel of every ActiveX control that may be using it.

b. Close all windows and update the use counts.

2. Using the Classic View, in the Scripts pane, expand ActiveX Event, right-click the ActiveX script name and click Delete. When a message appears, click Yes. The ActiveX event script is deleted.

Last modified: Saturday, 7 March 2020, 2:53 PM