Basic Script Syntax

open(Form, Version)[Form/Grid Actions]
.Outputs
.Actions
.Each

Where:

  • Form: name of opening form. Example w01012b.
  • Version: optional version name.
  • Form/Grid Actions: zero or more form or grid actions.
  • Outputs: zero or more output definitions.
  • Actions: zero or more execute actions.
  • Each: optional each statement.

Note: The stripped open( Form ) statement submits the form with the demo flag to fetch the spes.

Form/Grid Actions

The following form actions are available:

  • do( id* ) : click a button/row/form exit. Example do(4).
  • set( id* , value*) : set control’s value. Example set(14, "Some name").
  • qbe( QBE , value*) : set value of QBE column. Example qbe(1[19], 4001).
  • select( Row ) : select grid row. Example select(1.10).

The following grid actions are available:

  • insert[ grid* one or more Row Actions ]
  • update[ grid* one or more Row Actions ]

Where Row Action has the format:

row* :( one or more comma separated Column Actions ) followed by optional Each

Where Column Action has the format:

column* : value

id* : Control’s AIS id.
value* : Literal in optional double quotes.
grid* : Grid’s AIS id (normally 1).
row* : Zero index row number.
column* : Grid’s Column AIS id.

Outputs

Output statement can be one of:

  • .output( Format , zero or more Parameter )
  • .output.dump. The AIS full return (useful for debugging).

Where:

  • Format is a double quoted string with optional {i} placeholders.
  • Parameter can be one of:
    • $form : returned form name.
    • $title : return form title.
    • $row : input row number.
    • $col[i] : input column with zero index i. Example $col[0] is the first column.

Actions

Action has the format:

.action[ Form\Grid Actions as above ]

Each

Each is a two dimensional array and can either be:

  • .each[ elements ] : where elements is one or more array [ (string* number) ,...]
  • .each@ variable: where _variable is Excel table name.

string*: must be in double quotes.

Basic Samples


Table of contents


Copyright © 2020 Finnur Bragason.