Reading And Writing Properties At Run Time; Calling Methods At Run Time; Responding To Events - Omron CX-SUPERVISOR - V2.0 User Manual

Table of Contents

Advertisement

CHAPTER 5 – ActiveX Objects

Reading and Writing Properties at Run Time

ActiveX properties can be read and written at runtime, for example to change values or colours as
required. This can be achieved using the CX-Supervisor script functions GetProperty and
PutProperty, or alternatively in VBScript using the normal dot syntax for example
@VBSCRIPT
Display1.Value = 100
@ENDIF
For more details see the CX-Supervisor Script Language Reference Manual.

Calling Methods at Run Time

ActiveX methods can also be called at runtime. This is achieved by using the Supervisor script
function Execute or alternatively in VBScript using the normal dot syntax for example
@VBSCRIPT
CommonDialog1.ShowOpen
@ENDIF
Again for more details see the CX-Supervisor Script Language Reference Manual.

Responding to Events

Some ActiveX components are written to generate events on certain conditions, like mouse clicking
or user input or error conditions. You can write a script to execute whenever any event occurs. These
scripts are defined as subroutines in the page initialisation script as they may be called any time the
page is open. To easily add these subroutines, from the ActiveX property browser, click the 'Events'
tab. This shows all the event types for this control and any parameters the event may pass, for
example the code number of the key pressed. Select the event name to add or edit the script for, and
click the square edit button.
Page 72
OMRON
Release 2.0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents