83
•
To change the information for a name, use the
‘Set up names’
command, and edit the
‘Value’
line for the relevant name.
13.2.1Using names in a script
To use named information in a script, you need to instruct the machine to load the correct names
file using the loadnames command, e.g.
LOADNAMES “D:\Comms\Comms.nam”
You can then use the information in this file in either a send or sendwait command. To do this,
add a
$
sign to the name. E.g., to send the information named “pass1”, use the line:
SEND pass1$
You can send more than one name at once - or mix different kinds of information - by using the
&
operator. E.g.
SEND username$ & pass$ & “mail”
•
If you alter named information in the course of a connection, or create new named
information using, say, the
QUERY
command, you can then use the
SAVENAMES
command to preserve the changes, e.g.
SAVENAMES “C:\Comms\Names\BBSnames.nam”
13.2.2 Storing name information using the query command
You can create names while the script is running, using the
QUERY
command. E.g.
QUERY “Dial-up details”
“BBS telephone number” , no$
“Modem initialisition string” , init$
“Username” , name$
“Password” , pass$
ENDQUERY
prompts the user with a dialog asking for information which is then stored under the names “no”,
“init”, “name” and “pass”.
13.2.3 Reserved names
There are three “reserved” (i.e. not free to use for any information) names, which can only be used
for special kinds of information. They are:
sys_echo$
sys_incoming_crlf$
sys_outgoing_crlf$
These are essentially the scripting language equivalents of the
‘Translate codes’
options on the
‘Tools’
menu in the Terminal emulation screen. They toggle the “local echo” feature, and control
whether or not a line feed instruction is added to each incoming and outgoing carriage return.
The line
sys_echo$=1
switches the local echo function on, which allows you to see the characters you are sending on the
home screen. Setting a value of 0 switches it off.
The line
sys_incoming_crlf$=1
tells the MC 218 to start a new line each time the remote machine sends a carriage return. Setting
a value of 0 switches it off.
The line
sys_outgoing_crlf$=1
tells the remote machine to start a new line each time you send a carriage return from the MC
218. Setting a value of 0 switches it off.