All documentation

eXpress Script Editor

Authoring scripts for the eXpress family in the eXpress Script Editor — menus, syntax highlighting, dialogs, OLE automation, and quick reference.

Last updated May 6, 2008

What it is

The eXpress Script Editor is the authoring environment for scripts used by the eXpress product family (T27 eXpress, UTS eXpress, WinQ, and the modernization tools that consume them). It provides syntax-highlighted editing, syntax checking, compilation, mass compilation, and a Dialog Designer for building dialog forms without writing layout code by hand.

Editor features

  • File operations — New, Open, Save, Save As, Close, Print, Editor Properties
  • Edit — Undo/Redo, Cut/Copy/Paste/Delete, Select All, Word Wrap
  • Search — Find, Find Next, Replace, Go to Line, five bookmarks
  • Options — Show Tool Bar, Syntax Highlight, View Permanent Declarations
  • Tools — Check Script (F4), Compile Script (F5), Script Mass Compiler, Dialog Designer (F10)
  • Configurable edit-window font (name, size, bold) and colors

Language essentials

Variables

Scripts use BASIC-style variable types: Integer (-32,768 to 32,767), Long (-2,147,483,648 to 2,147,483,647), Single, Double, String, Boolean, Date, Object, and Variant. Use Dim to declare and Type/End Type for user-defined records.

Type DiskInfo
    sName As String * 32
    fFixedDisk As String * 1
    nErrCode As Integer
End Type

Sub Main
    Dim v
End Sub

Flow of control

  • If condition Then statement — single-line
  • If / ElseIf / Else / End If — multi-line
  • Select Case … End Select
  • For / Next, Do / Loop, While / Wend

Subroutines, functions, and files

Sub and Function declarations support typed parameters and return values. File I/O follows BASIC conventions (Open, Close, Print #, Write #, Input #, Line Input #) with random-access support for fixed-record files.

Dialogs and OLE automation

Dialog forms can be hand-coded (List Boxes, Check Boxes, Text Boxes, Option Buttons, Group Boxes) or — better — built visually with the eXpress Dialog Form Designer. OLE Automation lets a script drive any OLE-aware application (Excel, Word, custom in-house objects) by acquiring an OLE object and invoking its properties and methods.