Programming Environment

<< Click to Display Table of Contents >>

 

Programming Environment

The programming environment for scripts in E3 Studio can be accessed by right-clicking any object and then selecting the Properties option. On the Scripts tab of an object View, there is a combo box where users can define which event generates a script. As described on the previous chapter, the types of events in an E3 object are Pre-Defined and User-Defined.

Pre-defined events vary from object to object, depending on its usage and functionality. A Screen object, for example, contains graphical-interface-related events, such as Click (called when clicking an object) or DblClick (called when double clicking an object). An object such as an I/O Driver, on the other hand, contains communication-related events, such as OnCommError (called when there is a communication error). Users can also define other events for an object, as described before.

When users link a script to an event in an object, the text field presents a procedure declaration whose definition is automatic, and formed by the next text.

Sub ObjectName_EventName()
End Sub

 

Where ObjectName is the name of a linked object and EventName is the name of an event. Script commands must be placed between these two lines.

To help typing a script, users can use AppBrowser. After selecting the preferred method or property, click Copy. The selected Tag, property, or method is inserted at cursor's position on script's View. The cursor position is shown as a blinking insertion point.

Was this page useful?