The Scripting Editor GUI is shown below. It has the following parts:
|•||A Scripting Project Tree pane (top left-hand side)|
|•||A Properties and Events pane (bottom left)|
|•||A Main Window with Design and Source tabs|
|•||A Form Object Palette (right-hand side)|
The Scripting Editor toolbar contains icons for:
|•||Standard file commands such as New, Open, Save, and Print. These commands are used to create new scripting projects, open existing scripting projects, and save and print scripting projects.|
|•||Standard editing commands such as Copy, Paste, Undo, Redo, Find, and Replace. Note that the Find and Replace commands are applied to code in the Source tab of the Scripting Editor.|
The Scripting Project Tree (screenshot below) shows the various components of the scripting project, structured along four main branches: (i) Global Declarations, (ii) Forms, (iii) Events, and (iv) Macros.
The Scripting Project Tree provides access to each component of the scripting project. For example, in order to display and edit a particular Form, expand the Forms folder in the tree (see screenshot above), right-click the Form you wish to display or edit, and click Open from the context menu that pops up.
A quicker way to open a Form, Event, macro, or the Global Declarations script, is to double-click the respective icon, or text. To delete a Form or Macro from the scripting project, right-click the component and select the Delete command from the context menu.
The Scripting Project Tree pane contains a toolbar with icons (screenshot below).
The icons, from left to right, are for: (i) creating a new macro, (ii) creating a new form, (iii) running a macro, and (iv) debugging a macro. These commands are also available in the context menu that appears when you right-click any component in the Scripting Project Tree.
The Properties and Events pane (screenshot below) displays the following:
|•||Form properties, when the Form is selected|
|•||Object properties, when an object in a Form is selected. (The screenshot below shows, at left, the properties of the object selected in the Form at right.)|
|•||Form events, when a Form is selected|
|•||Object events, when an object in a Form is selected|
To switch between the properties and events of the selected component, click, respectively, the Properties icon (third from left in the Properties and Events toolbar, see screenshot above) and the Events icon (fourth from left).
The first and second icons from left in the toolbar are, respectively, the Categorized and Alphabetical icons. These display the properties or events either organized by category or organized in ascending alphabetical order.
When a property or event is selected, a short description of it is displayed at the bottom of the Properties and Events pane.
The Main Window displays one component at a time and has one or two tabs depending on what is being displayed. If a Global Declarations script, an Event, or a Macro is being displayed, then a single tab, the Source tab, displays the source code of the selected component.
The Source tab supports:
|•||source code folding|
|•||setting/deleting bookmarks using CTRL+F2|
|•||autocompletion entry helper with parameter info|
|•||Goto Brace, Goto Brace Extend|
|•||Zoom In / Zoom Out|
|•||full method/property signature shown next to the autocompletion entry helper|
|•||brace highlighting during code entry|
|•||mouse over popups; placing the mouse over a known method or property, displays its signature (and documentation if available)|
If a Form is being displayed, then the Main Window has two tabs: a Design tab showing and enabling the layout of the Form, and a Source tab containing the source code for the Form. Content in both the Design tab and Source tab can be edited.
|Note:||Since JScript and VB Script are untyped languages, entry helpers and auto-completion is supported only in cases of "fully qualified constructs" and "predefined" names.|
If names start with objDocument, objProject, objXMLData, or objAuthenticRange, members of the corresponding interface will be shown. Auto-completion entry helper and parameter info are shown during editing, but can also be obtained on demand by pressing Ctrl+Space.
The Form Object Palette contains all the objects that are available for designing Forms and looks something like the screenshot below. Registered ActiveX controls can be added to the Form Object Palette by right-clicking the pane and selecting the Add ActiveX Control command
To insert an object from the Form Object Palette click the object you want in the palette, then click at the location in the Form where you wish to insert the object. The object will be placed at this location. In many cases you will need to supply some properties of the object via the Properties and Events pane. You can drag the object to other locations as well as resize it. Further, a number of editing commands, such as centering and stacking objects, can be accessed via the context menu of the selected Form object.
Some Form objects, such as Timer, are not added to the Form but are created as Tray Components in a tray at the bottom of the Main Window. You can select the object in the tray and set properties and event handlers for the object via the Properties and Events pane. For an example of how Tray Components are handled, see Form usage and commands.
© 2018 Altova GmbH