12-5
Creating A Script File
also sometimes necessary to ensure that the LAST character received from the host is
the LAST character of the string, to ensure that the host is ready to accept what is
sent by the put command. You can use the Display Controls option in the Terminal
Settings dialog box to find this out.
The script could now be attached to a soft button (or key, mouse button, hotspot, etc.)
so that you could simply click on the relevant button to attach to a different host
computer. Indeed, several buttons could be set up in this way to allow attachment to a
variety of different host computers on the network.
Programming Soft Buttons
The LOGON script described in the previous section can be attached to a soft button
as follows:
pset buttons name SB1L1 "log on"
pset buttons command SB1L1 "<'logon'>"
exit
This will label the first button on the top row of soft buttons Level 1 as 'log on' and
cause the script logon to be invoked when the left mouse button is clicked on this soft
button. This is because the command which we programmed into this button
included the delimeters <' and '>, which signify that a script file should be invoked
with the filename specified.
To enable connection to more than one host you can program a separate button for
each required connection as follows:
pset buttons L1TITLE "CONNECT"
pset buttons name SB1L1 "TEK"
pset buttons command SB1L1 "<'logon1'>"
pset buttons name SB2L1 "W3220"
pset buttons command SB2L1 "<'logon2'>"
pset buttons name SB3L1 "VAX 1"
pset buttons command SB3L1 "<'logon3'>"
pset buttons name SB4L1 "VAX 2"
pset buttons command SB4L1 "<'logon4'>"
exit
Now we have configured four soft buttons for connection to four different services
("TEK", "W3220", "VAX 1", "VAX 2"), using four different LOGON files. We have
also added the TITLE CONNECT to the Level 1 soft buttons, which will be shown
in the box under Level 1.
You can specify a different terminal emulation for each connection by adding
another line to each LOGON script file as follows: