96
‘
myname
’. Up to six items can be prompted for in a
QUERY
dialog. The
string which follows
QUERY
is the title of the dialog.
QUERY
requires a
matching
ENDQUERY
command.
QUERYOK
allows the script to act
differently depending on whether the
QUERY
dialog was exited by
tapping
‘OK’
, or by pressing Esc. E.g.
QUERY “Enter details”
“Username:” , myname$
“City” , city$
“Password” , pass$
ENDQUERY
IF QUERY OK THEN
GOTO logon
ELSE
GOTO cancelled
ENDIF
jumps to the ‘
logon
’ label if
‘OK’
is pressed, but the ‘
cancelled
’ label if
the
QUERY
dialog is exited using Esc.
R
EAD
see
O
PEN
R
ENAME
RENAME <filename>,<filename>
Renames the file indicated in the first string expression to the name
specified in the second. E.g.
RENAME “C:\Documents\Names”,“Names2”
R
EPEAT
REPEAT
U
NTIL
<command>
UNTIL <expression>
Repeats a command until a certain condition is met. E.g.
SET a=5
REPEAT
SEND “<013>”
a=a-1
UNTIL a=0
Sends carriage returns and deducts 1 from the value of
a
until the value of
a
reaches 0.
Note: The important difference between
REPEAT…UNTIL
loops and
WHILE…DO…ENDWHILE
loops is that
REPEAT…UNTIL
always
executes the specified action at least once, and ceases to do so when a
condition is met. By contrast,
WHILE…DO…ENDWHILE
checks for a
condition
before
ever carrying out an action, so if the condition is not met,
the action will not be executed at all.
R
ESET
RESET
Returns all communications settings back to their standard values. You
may want to use this before a
SETUP
command, so that you can be sure of
the complete configuration. E.g.