A script is a list or file containing communications commands. Script languages are often provided by general-purpose communications programs to automate standard operations like logging on and off, file upload, and file download. The scripting support in TApdScript provides similar, though much simpler, script facilities for Async Professional applications.
The AdScript unit provides a single documented component: TApdScript. TApdScript implements a script language of about a dozen commands. While you wouldn’t want to build a complete BBS using just these commands, they provide enough features to automate and simplify many standard tasks.
The script language
The basic syntax of the script language is shown in the following line of code:
command data1 data2;commenta
In this line of code, command describes the action to perform, data1 and data2 are optional arguments, and comment is an optional comment. The format of the arguments vary among commands. The various components of each line must be separated by at least one space or a comma. Additional spaces are permitted, but ignored. Commands are not case-sensitive.
The following is a list of supported commands:
DISPLAY 'XX XX'
SENDBREAK duration in ms
DELAY duration in ms
IF CONNECTED labela
SET option data
RUN command waita
IF SUCCESS labela
WAIT 'XXXX' timeout in ms
IF TIMEOUT labela
IF FAIL label
WAITMULT 'XXX|YYY|ZZZ' timeout in msa
This document maintained by the Async Professional Project.