home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / comm / vt10029b.lzh / vt100.doc < prev    next >
Text File  |  1990-03-26  |  37KB  |  979 lines

  1. This is the documentation file for the VT100 terminal emulator originally
  2. by Dave Wecker.  Versions 2.7-2.9 are by Tony Sumrall.  I can be reached
  3. on USENET => acs@amdahl.com
  4.  
  5. Dave can be reached via:
  6.  
  7.     Dave Wecker at    ENET:    COOKIE::WECKER
  8.             ARPA:    wecker%cookie.dec.com@decwrl.dec.com
  9.             USENET:    {decvax|decwrl}!cookie.dec.com!wecker
  10.             SNAIL:    Dave Wecker
  11.                 115 Palm Springs Drive
  12.                 Colorado Springs, CO  80908
  13.  
  14. Note that Dave had NOTHING to do with this release.  Don't bother him with
  15. problem in my code.
  16.  
  17.  
  18. MANY pieces of code/suggestions have been sent in..
  19.  
  20.     thanks to all!
  21.  
  22. Program startup:
  23. ----------------
  24.     1> vt100 [-i | +i initfile] [ scriptfile ... ]
  25.  
  26.                 - -i option means don't look for an init file; +i means
  27.                   look for an init file of this name.  The search for the
  28.                   init file will be the current directory then S:.  Of
  29.                   course you can always override this by saying C:file if
  30.                   you like.  The format for the init file is described
  31.                   later in this document.
  32.  
  33.         - The init file controls the setting of initial defaults
  34.           and screen and macro definitions.
  35.  
  36.         - If none of the files (listed above) are found, the
  37.           built-in defaults (defined in VT100.C as variables,
  38.           beginning with "p_") are used.
  39.  
  40.         - All commands are either menu or script based. Scripts
  41.           are described below.
  42.  
  43. Menus (Commands in parenthesis are default keyboard bindings: Right-Amiga-chr):
  44. -----------------------------------------------------------------------
  45. File                - file transfers
  46.     Protocol        - Sets the protocol to be used for send/rec.
  47.         ASCII        - use uncontrolled protocol
  48.         Xmodem    (A-X)    - use the ever-popular Xmodem Checksum
  49.         XmodemCRC    - use the in demand Xmodem CRC
  50.         Kermit    (A-K)    - my favorite protocol
  51.         .
  52.         .        - externally defined transfer programs
  53.         .
  54.     Send        (A-S)    - Send a file using the selected protocol
  55.     Receive        (A-R)    - Receive a file as above
  56.     Kermit Get    (A-G)    - Get files from a kermit server
  57.     Kermit Bye    (A-B)    - Finish with the kermit server.
  58.     Capture            - Log received text to a file.  Changes to
  59.                   Capturing when in progress
  60. Comm Setup            - Setup communications
  61.     Baud Rate        - Set the terminal baud rate
  62.         300
  63.         1200    (A-L)
  64.         2400    (A-H)
  65.         4800
  66.         9600
  67.     Parity            - Type of parity
  68.         NONE    (A-X)
  69.         MARK
  70.         SPACE
  71.         EVEN    (A-E)
  72.         ODD    (A-O)
  73.     Xfer Mode
  74.         Image    (A-I)    - Send files verbatim (for UNIX hosts or
  75.                   binary files)
  76.         Text    (A-T)    - Send CR LF as line terminator and strip
  77.                   CR on received files (VMS text).
  78.         Convert        - Should KERMIT convert fnames to lower case
  79.         AutoChop    - Enable/disable AutoChop on XMODEM xfers
  80.     Shared            - Causes VT100 to use the serial port in shared
  81.                   mode (see description of the Shared script
  82.                   command).
  83.     AutoChop        - Does autochop of XMODEM received files.
  84. Script                - Script commands
  85.     Execute Macro    (A-M)    - Start up an asynchronous script file
  86.     Abort Execution    (A-A)    - Terminate a script file
  87.     AREXX Macro        - Send a command to AREXX for execution
  88. Utility            - Utility commands
  89.     Send Break    (A-.)    - send a break to the host
  90.     Hang Up            - close line (not implemented yet)
  91.     Change Dir    (A-D)    - change the local directory (for transfers)
  92.     Clear Scrn        - clear the screen (initial state)
  93.     Echo            - turn on/off half duplex mode
  94.     Wrap        (A-W)    - turn on/off long line wrapping mode
  95.     Num Key        (A-K)    - turn on/off numeric keypad mode
  96.     App Cur        (A-C)    - turn on/off application cursor mode
  97.     BS<->DEL        - swap backspace and delete keys
  98.     Mouse Up        - send mouse UP events
  99.     Mouse Dn        - send mouse DOWN events
  100.  
  101. Keypad mapping (in application keypad mode):
  102. --------------------------------------------
  103.  
  104.         AMIGA        VT100        comments
  105.         -------        -------        ---------------------------
  106.         0-9    ==    0-9
  107.         .    ==    .
  108.         ENTER    ==    ENTER        (basically, flip the bottom
  109.         -    ==    ,         2 keys up to get a VT100)
  110.         HELP    ==    -        (only free key around)
  111.         f1-f4    ==    PF1-PF4        (or any rebinding you do)
  112.         arrows    ==    arrows
  113.  
  114. Note:    If you own an A500 or an A2000 and you use a "good" keymap the
  115.     top 4 keys of the keypad will function as the VT100 F1-F4.  This
  116.     that you can use the Amiga's F1-F4 for your own use and still have
  117.     the ability to generate the VT100 PF1-PF4.
  118.  
  119.     Right AMIGA key in conjunction with a period (".") will send a
  120.     break to the host.
  121.  
  122.     CTRL in conjunction with an at-sign ("@") a two ("2") or a
  123.     space (" ") will send a NULL to the host.
  124.  
  125.     CTRL in conjunction with a six  ("6") will send a CTRL-^
  126.     CTRL in conjunction with a dash ("-") or question mark ("?")
  127.         will send a CTRL-_ to the host.
  128.  
  129. Multi file Xfers:
  130. -----------------
  131. The VT100 emulator supports multiple file transfers. This is
  132. specified by using a comma (",") between file names when using XMODEM
  133. or KERMIT. (NOTE: host XMODEM's normally CANNOT support multiple file
  134. transfers).
  135.  
  136. When specifying a file name to recieve by default the directory path is
  137. stripped off of the filename when sent to the host but is kept for the
  138. local file spec. eg:
  139.  
  140.         receive file: ram:file.txt,df1:newfile.bin,$
  141.  
  142. will ask the server for file.txt and put it in ram:, and get newfile.bin
  143. and put it on df1: (see explanation of "$" below). If you do a single file
  144. transfer you will get another prompt for the remote name e.g.:
  145.  
  146.         receive file: ram:file.txt
  147.         remote file name [file.txt]:  userdisk1:wantfile.txt
  148.  
  149. The same rules apply to sending multiple files therefore if you are doing
  150. multi file transfers make sure the host server is connected to the desired
  151. directory.
  152.  
  153. In addition KERMIT supports wildcards:
  154.     * = any number of characters
  155.     ? = any single character
  156. Examples:
  157.     send:    *.c,*.h,*.doc
  158.     get:    *.c,*.h,$
  159.  
  160. Note that in this release, wilcarded files may be sent to a KERMIT that is
  161. *not* in server mode (e.g. you can say "RECEIVE" to the host KERMIT and
  162. send *.c files successfully).
  163.  
  164. KERMIT receive is now smart enough to use the host filename so no
  165. filename needs to be specified on the AMIGA's side (see the CONVERT option).
  166.  
  167. If your host is capable of sending or receiving long packets (packets in
  168. excess of 94 bytes) you may set p_kmaxpack to some number <= 1000.  The
  169. script command KMAXPACK can accomplish the same result.
  170.  
  171. Initialization and Script file operation:
  172. -----------------------------------------
  173. An initialization file (as described in the "Program Startup" section) may
  174. contain any of the commands shown below that have the word INIT in their
  175. description below. Commands that are available from scripts have the word
  176. SCRIPT in the descriptions below. All commands may be abbreviated to 3
  177. letters and are case insensitive.
  178.  
  179. The script file can be invoked by selecting 'execute file' from the script
  180. menu. At any time you can abort the script file by selecting 'Abort
  181. Execution'. You may also invoke a script from a function key if the first
  182. character of the function key definition is the KEYSCRIPT character (e.g.,
  183. define F5 as "~df1:foo.script").
  184.  
  185. Prior to release 2.9A (a patch release to 2.9), VT100 would interleave
  186. script command execution with the processing of data received from the
  187. serial port.  This made scripts inherently timing dependant.  To remove
  188. this timing dependancy, beginning with 2.9A, VT100 will not receive nor
  189. process data from the serial port while executing a script until the
  190. script issues a WAIT or a DELAY command.  Since the ON command depends
  191. on receipt of serial data, this change will also delay ON command
  192. execution until a WAIT or DELAY is encountered in the script as well.
  193. However, during the time a script file is running terminal emulation is
  194. still active and you may type simulataneous with the execution of the
  195. script file.  This may be desired if your script file is WAITing for a
  196. string or is DELAYing for a period of time etc.  You may, of course,
  197. cancel the execution of a script at any time
  198.  
  199. AREXX support:
  200. --------------
  201. AREXX is supported in this release.  If an unknown command is entered and
  202. VT100 can successfully communicate with AREXX then VT100 will automatically
  203. forward the unknown command to AREXX for execution -- AREXX will follow its
  204. normal search order.
  205.  
  206. The host name (address() in AREXX parlance) is composed of the characters
  207. VT100-, the name of the serial device used (i.e.  the value specified on the
  208. DEVICE command or the value of p_device) and the unit number (i.e. the value
  209. specified on the UNIT command or the value of p_unit).  For an unmodified
  210. system using the serial device distributed with Workbench the hostname would
  211. be "VT100-serial.device-00".
  212.  
  213. When you invoke an AREXX macro, AREXX will automatically search for a file
  214. whose name ends in .vt100.  For example, if you enter FOO and have an AREXX
  215. macro present named FOO.vt100, AREXX will execute it on VT100's (and your)
  216. behalf.
  217.  
  218. If for some reason a path to AREXX cannot be established on startup, VT100 will
  219. NOT attempt to send unknown commands to AREXX.  The user can force a retry by
  220. using the RX command or the RX menu item.
  221.  
  222. All AREXX macros run by VT100 run asynchronously with other work including
  223. scripts and other AREXX macros.  Be aware of this -- you could surprise
  224. yourself!
  225.  
  226. The is one special command, FORWARD, which can only be used by issuing it from
  227. an AREXX macro.  This command allows an AREXX user to request that all data
  228. received from the serial port be forwarded to a port for inspection.  Heavy use
  229. of this facility will cause VT100 to slow down considerably!  Use it with
  230. caution!  This command does, however, provide some substantial benefits.  Most
  231. notable amongst those are the ability to effectively write a multi-way ON
  232. command.  See the sample AREXX macros packaged with the distribution.
  233.  
  234. Script commands will return a return code to the invoking AREXX script.  AREXX
  235. automatically places this value into the special variable RC.  The values
  236. returned are listed in vt100.h and are explained here:
  237. CMDOK    - Command executed OK
  238. CMDWARN    - Command issued a WARNING message but completed in some fashion
  239. CMDBS    - Command is invalid for current state (e.g. INIT only)
  240. CMDNF    - Command not found (i.e. invalid command)
  241. CMDFAIL    - Command failed completely.
  242.  
  243. Initialization and Script file Commands:
  244. ----------------------------------------
  245. #    Commented line                    (INIT,SCRIPT)
  246.     Format:
  247.     # This line is a comment
  248. --------------------------------------------------------------------------
  249. APPCUR    Set the application cursor mode            (INIT,SCRIPT)
  250.     Format:
  251.     APPCUR    ON/OFF or YES/NO
  252. --------------------------------------------------------------------------
  253. ASCII_SEND Send an ascii file to the host.        (SCRIPT)
  254.     Format:
  255.     (same format as CAPTURE)
  256. --------------------------------------------------------------------------
  257. AUTOCHOP Enable/disable XMODEM auto-chop        (INIT, SCRIPT)
  258.     Format:
  259.     AUTOCHOP    ON/OFF or YES/NO
  260. --------------------------------------------------------------------------
  261. BACKGROUND Define a background color            (INIT)
  262.     Format:
  263.     BACKGROUND hex        three digit hex number
  264.     Example:
  265.     BACKGROUND F00        bright red background
  266. --------------------------------------------------------------------------
  267. BAUD    Set baud rate                    (INIT,SCRIPT)
  268.     Format:
  269.     BAUD rate        Sets the baud rate for send/receive
  270.     Example:
  271.     BAUD 2400        Sets the baud rate at 2400 baud
  272. --------------------------------------------------------------------------
  273. BEEP    Beep at the console                (SCRIPT)
  274.     Format:
  275.     BEEP
  276. --------------------------------------------------------------------------
  277. BOLD    Define a color for bold                (INIT)
  278.     Format:
  279.     (same as BACKGROUND)
  280. --------------------------------------------------------------------------
  281. BREAK    Set the break time (for an SB command)        (INIT,SCRIPT)
  282.     Format:
  283.     BREAK value        Value is in micro-seconds
  284.     Example:
  285.     BREAK 750000
  286. --------------------------------------------------------------------------
  287. BUFFER    Set transmission buffer size            (INIT)
  288.     Format:
  289.     BUFFER n        Number of bytes to buffer
  290.     Example:
  291.     BUFFER 512
  292. --------------------------------------------------------------------------
  293. CAPTURE    To start/stop ascii file capture.        (SCRIPT)
  294.     Format:
  295.     CAPTURE    file        Start ascii capturing
  296.     CAPTURE            End ascii capturing
  297. --------------------------------------------------------------------------
  298. CD    To change the local directory            (SCRIPT)
  299.     Format:
  300.     CD    newdir        set a new directory for file transfers
  301.     Example:
  302.     CD    DF1:foo/bar    set the directory as specified
  303. --------------------------------------------------------------------------
  304. CLOSE    Close info window                (INIT,SCRIPT)
  305.     Format:
  306.     CLOSE            Note there are no parameters
  307.     Example:
  308.     CLOSE            This command can be execute from either a
  309.                 VT100 or an AREXX script.  If this command
  310.                 is executed then there will be no message
  311.                 confirming the script's completion.
  312. --------------------------------------------------------------------------
  313. CONVERT    Tell KERMIT whether or not to convert filenames    (INIT,SCRIPT)
  314.     Format:
  315.     CONVERT    ON/OFF or YES/NO
  316.     Example:
  317.     CONVERT    ON        Filenames will be down cased
  318. --------------------------------------------------------------------------
  319. CURSOR    Define a color for the cursor            (INIT)
  320.     Format:
  321.     (same as BACKGROUND)
  322. --------------------------------------------------------------------------
  323. DELAY    Suspends script file for a specified time    (SCRIPT)
  324.     Format:
  325.     DELAY    n        Suspends execution for n seconds
  326.     Example:
  327.     DELAY    2        Suspends for 2 seconds
  328. --------------------------------------------------------------------------
  329. DEPTH    Define the depth of the window/screen        (INIT)
  330.     Format:
  331.     DEPTH n        Number of planes in window/screen
  332.     Example:
  333.     DEPTH 1        Minimum depth
  334.     DEPTH 2        Same as Workbench
  335. --------------------------------------------------------------------------
  336. DEVICE    Define name of serial device handler to use    (INIT)
  337.     Format:
  338.     DEVICE name    Sets name of serial device handler to name
  339.     Example:
  340.     DEVICE newser.device    Set name of serial device handler to
  341.                 newser.device
  342.     DEVICE serial.device    Set name of serial device handler to the
  343.                 "default" (i.e. the C-A supplied device)
  344. --------------------------------------------------------------------------
  345. DISPLAY    Display data on the screen            (SCRIPT)
  346.     Format:
  347.     DISPLAY string    Displays string on the screen as though received from
  348.             the serial port (including escape sequence handling)
  349.     Example:
  350.     DISPLAY ^M        Causes VT100 to act as though a carriage-return
  351.                 were received over the serial port.
  352.     DISPLAY "^[[M"        Deletes the current line on the screen.
  353.     DISPLAY "Move^[[Aup one line"    Displays "Move" on the current line on
  354.                 the screen then moves the cursor up one line
  355.                 displays "up one line".
  356. --------------------------------------------------------------------------
  357. ECHO    Turn on/off local echo                (INIT,SCRIPT)
  358.     Format:
  359.     ECHO    ON/OFF or YES/NO
  360.     Example:
  361.     ECHO    ON        Half duplex mode
  362. --------------------------------------------------------------------------
  363. EXIT    Ends execution of the current script file.    (INIT,SCRIPT)
  364.     Format:
  365.     EXIT            Exit the current script/init file
  366.     EXIT VT100        Exit vt100 program (from SCRIPT only)
  367.     EXIT newscript        Exit this file and start up newscript
  368.     Example:
  369.     EXIT DF1:FOO.BAR    Exit the current file and start FOO.BAR
  370. --------------------------------------------------------------------------
  371. EXTERNAL    Define external transfer program    (INIT,SCRIPT)
  372.     Format:
  373.     EXTERNAL "mode-name" "send-pgm" "receive-pgm"
  374.                 Send-pgm and receive-pgm may contain the strings
  375.                 @LOCAL and @REMOTE which will cause VT100 to put
  376.                 up a requester asking for local and/or remote
  377.                 filenames.  These will be substituted in place
  378.                 of their respective parameters in the send-pgm
  379.                 and/or receive-pgm prior to invoking it/them.
  380.                 See also the description of the SHARE command.
  381.     Examples:
  382.     EXTERNAL "FOO" "foo baz" "baz foo"
  383.                 Define external transfer program which will
  384.                 be called FOO in the MODE menu.  Invoke foo
  385.                 passing baz to SEND files, invoke baz passing
  386.                 foo to RECEIVE files.
  387.     EXTERNAL "FOO" "foo @REMOTE baz" "baz @LOCAL @REMOTE foo"
  388.                 As above but display a requester for the remote
  389.                 filename (in the case of send) or both the
  390.                 local and remote filenames (in the case of
  391.                 receive).  The name(s) used to satisfy the
  392.                 requester(s) will be replaced in the parameter
  393.                 string to the appropriate program prior to
  394.                 its invocation.
  395.     EXTERNAL FOO        Remove definition of transfer pgm FOO
  396. --------------------------------------------------------------------------
  397. F    Define a function key or the mouse prefix    (INIT,SCRIPT)
  398.     Format:
  399.     F n string        Define Function key n to be string
  400.     F M string        Define the mouse prefix (the prefix sent to
  401.                 the host when a mouse button is used AND
  402.                 events are selected via the MOUSE command
  403.     Example:    (see SEND for string format)
  404.     F 1 "dir^M"        Define F1 is the string dir<cr>
  405.     F 11 "help"        Define Shifted F1 as the string help
  406.     F 20 ^C            Define Shifted F10 as a control-C
  407.     F M "^[O"        Send ESC-O before mouse data
  408. --------------------------------------------------------------------------
  409. FONT Specify font to use                (INIT)
  410.     Format:
  411.     FONT font-name
  412.     Example:
  413.     FONT point-font
  414. --------------------------------------------------------------------------
  415. FONTSIZE Specify font size to use            (INIT)
  416.     Format:
  417.     FONTSIZE font-size
  418.     Example:
  419.     FONTSIZE 8
  420. --------------------------------------------------------------------------
  421. FOREGROUND Define a color for the foreground        (INIT)
  422.     Format:
  423.     (same as BACKGROUND)
  424. --------------------------------------------------------------------------
  425. FORWARD Forward received data to an AREXX port        (REXXONLY)
  426.     Format:
  427.     FORWARD portname
  428.     Example:
  429.     FORWARD REXX-VT100    Sends received data to a port named
  430.                 REXX-VT100.  This command can (and probably
  431.                 WILL) cause you to GURU if you remove the
  432.                 port before you tell VT100 to quit
  433.                 forwarding data.
  434.     FORWARD            Tells VT100 to quit forwarding data
  435. --------------------------------------------------------------------------
  436. GOTO    Jumps to a different part of the script file.    (SCRIPT,NONREXX)
  437.     Format:
  438.     GOTO label        Jumps to a line beginning with label:.
  439.                 Jumps may be forward or backward.
  440.     Example:
  441.     FOO:            Sets up a label
  442.     ...
  443.     GOTO FOO        Jumps to FOO
  444. --------------------------------------------------------------------------
  445. INTERLACE Turn on/off interlace                (INIT)
  446.     Format:
  447.     INTERLACE ON/OFF or YES/NO or ASIS
  448.     Example:
  449.     INTERLACE ON        Use interlacing
  450.     INTERLACE ASIS        Use interlace if WBSCREEN uses it
  451.  
  452.                 See also OVERSCAN, LINES and SCREEN.
  453. --------------------------------------------------------------------------
  454. KB    Send a BYE packet to a host KERMIT server.    (SCRIPT)
  455.     Format:
  456.     KB            Shut down server.
  457. --------------------------------------------------------------------------
  458. KEYSCRIPT Define a new keyscript character        (INIT,SCRIPT)
  459.     Format:
  460.     KEYSCRIPT hex        New character in hex
  461.     Example:
  462.     KEYSCRIPT 7E        Use "~" as the new character
  463. --------------------------------------------------------------------------
  464. KG    Gets files from host.                (SCRIPT)
  465.     Format:
  466.     (same format as KS)     Get from server
  467. --------------------------------------------------------------------------
  468. KMAXPACK Set maximum packet size for kermit transfers    (INIT,SCRIPT)
  469.     Format:
  470.     KMAXPACK n        Set maximum packet size to n
  471.     Example:
  472.     KMAXPACK 1000        Use long packets if possible.  Don't forget
  473.                 to increase the send/receive timeout values
  474.                 on your host!!!
  475. --------------------------------------------------------------------------
  476. KR    Receives a file from kermit host.        (SCRIPT)
  477.     Format:
  478.     (same format as KS)     Not from a server
  479. --------------------------------------------------------------------------
  480. KS    Sends files via kermit to the host.        (SCRIPT)
  481.     Format:
  482.     KS file            Send one file
  483.     KS file1,file2,...    Send multiple files
  484.     KS file1,file2,...,$    Send multiple files and shut down server
  485.     Example:
  486.     KS foo.bar        sends foo.bar (note no quoting is used)
  487.     KS foo1,foo2,foo3    sends three files
  488.     KS foo1,foo2,foo3,$    sends three files and shuts down server
  489. --------------------------------------------------------------------------
  490. LINES    Define number of lines in the window        (INIT)
  491.     Format:
  492.     LINES n
  493.     Example:
  494.     LINES 24        Maximum for non-interlace if OVERSCAN is OFF
  495.     LINES 48        Maximum for interlaced if OVERSCAN is OFF
  496.     LINES 0            Determine the maximum number of lines
  497.                 available and use it.  Note that this will
  498.                 constrain the window and screen to be the
  499.                 same size as or smaller than the Workbench
  500.                 screen.
  501.  
  502.                 See also: OVERSCAN, SCREEN, INTERLACE
  503. --------------------------------------------------------------------------
  504. MODE    Set a transfer mode for KERMIT to use        (INIT,SCRIPT)
  505.     Format:
  506.     MODE type        type of transfers to perform
  507.     Example:
  508.     MODE IMAGE        image mode transfers
  509.     MODE CRLF        <CR><LF> text transfers (VMS Kermit).
  510. --------------------------------------------------------------------------
  511. MOUSE    Enable reporting of mouse events to the host    (INIT,SCRIPT)
  512.     Format:
  513.     MOUSE BOTH/UP/DOWN/OFF
  514.     Example:
  515.     MOUSE OFF        Send no mouse events
  516.     MOUSE BOTH        Send both mouse up and down events
  517. --------------------------------------------------------------------------
  518. MSG    Cause VT100 to display a message        (SCRIPT)
  519.     Format:
  520.     MSG string    If string ends with a ^M then string will be displayed
  521.             and a subsequent MSG will overlay string.  If string
  522.             contains ^J then the text up to the ^J will be
  523.             displayed followed by a new-line followed by the
  524.             remainder of the text of string.
  525.     Example:    (see SEND for string format)
  526.     MSG "Show me this msg^J" Will display "Show me this msg" with a
  527.                 following new-line in the VT100 Info window.
  528.                 A subsequent MSG will overlay the text of this
  529.                 message.
  530.  
  531.     MSG "Show me^Mthis msg" Will display "Show me this msg" with a
  532.                 new-line after the words "me" and "msg".
  533.  
  534.                 See the SEND command for a more complete
  535.                 definition of string.
  536. --------------------------------------------------------------------------
  537. NUMKEY    Numeric keypad mode                (INIT,SCRIPT)
  538.     Format:
  539.     NUMKEY    ON/OFF or YES/NO
  540.     Example:
  541.     NUMKEY    ON        Keypad is pure numbers
  542. --------------------------------------------------------------------------
  543. ON    Peforms a command every time string is received    (SCRIPT)
  544.     Format:
  545.     ON      "string"  cmd    Execute cmd when string is received.
  546.                 Only one ON string may be installed at a
  547.                 time.
  548.  
  549.                 If cmd is a GOTO and we were previously
  550.                 WAITing for a string the WAIT is aborted
  551.                 and execution resumes at the new label.
  552.  
  553.                 If cmd is not SEND and we were previously
  554.                 DELAYing, then the DELAY is aborted and the
  555.                 cmd is executed, followed by the next
  556.                 command after the DELAY.
  557.  
  558.                 If cmd is a SEND and we were previously
  559.                 DELAYing, then the DELAY is continued.
  560.  
  561.                 If cmd is NULL (i.e. ON "") then the
  562.                 current ON command is aborted.
  563.     Example:
  564.     ON  "LOSS CARRIER" GOTO RESTART
  565.                 If modem drops carrier, try to redial
  566.     ON  "--more--" SEND " "
  567.                 Send a space every time --more-- is received
  568. --------------------------------------------------------------------------
  569. OVERSCAN    Allow overscan on custom screens    (INIT)
  570.     Format:
  571.     OVERSCAN ON/OFF or YES/NO
  572.     Example:
  573.     OVERSCAN ON        Normally, VT100 constrains the maximum
  574.                 screen size to be the same as Workbench.
  575.                 This command instructs VT100 to ignore the
  576.                 Workbench size and compute the screen size
  577.                 based on the value specified in the LINES
  578.                 command.  If LINES is set to 0 then VT100
  579.                 constrains the screen and window to the
  580.                 Workbench screen/window size irrespective
  581.                 of the OVERSCAN setting.
  582.  
  583.                 See also LINES, SCREEN and INTERLACE.
  584. --------------------------------------------------------------------------
  585. PARITY    Sets the parity                    (INIT,SCRIPT)
  586.     Format:
  587.     PARITY    type        Set the parity type
  588.                 Note that all received characters that are
  589.                 destined for the screen are subject to
  590.                 having their parity bits removed or left
  591.                 alone depending on the PARITY setting.
  592.                 Versions prior to 2.9 did not do this.  I
  593.                 corrected this bug but you should be aware
  594.                 that old scripts that depended on this
  595.                 incorrect behaviour will probably break.
  596.                 If, for example, you are connected to a
  597.                 host which uses MARK parity but you
  598.                 PARITY NONE you will most likely never
  599.                 match an ON string.
  600.     Example:
  601.     PARITY    NONE        no parity
  602.     PARITY    MARK        mark parity
  603.     PARITY    SPACE        space parity
  604.     PARITY    ODD        odd parity
  605.     PARITY    EVEN        even parity
  606. --------------------------------------------------------------------------
  607. RECF    Receive a file using the protocol specified in XPROTO    (SCRIPT)
  608.     Format:
  609.     RECF file-spec
  610.     Example:
  611.     XPROTO XMODEMCRC    Select XMODEM CRC protocol
  612.     RECF Foo        Receive Foo using XMODEM CRC
  613. --------------------------------------------------------------------------
  614. RX    Send a command to AREXX for processing        (INIT,SCRIPT)
  615.     Format:
  616.     RX    command args    Send command and args to AREXX
  617.     Example:
  618.     RX TRACE NOTHING    Cause AREXX to execute TRACE.VT100 passing
  619.                 one parameter ("NOTHING").
  620.  
  621.                 Note that it is normally unneccessary to use
  622.                 this command in other cases since VT100 will
  623.                 automatically route unknown commands to AREXX
  624.                 for processing.  However, if VT100 cannot
  625.                 communicate with AREXX at startup it will NOT
  626.                 automatically send cmds to AREXX and this
  627.                 command must be used.  In the normal case,
  628.                 though, this command will be used as the cmd
  629.                 option in an ON command.  Also note that AREXX
  630.                 macros are run asynchronously...you may get
  631.                 results that you don't expect so think about it
  632.                 if you want to try to run two or more AREXX
  633.                 macros sequentially.
  634.  
  635.                 See the section, above, on AREXX.
  636.  
  637.     Example:
  638.     ON "gin:" rx login acs    When "gin:" is received invoke the AREXX
  639.                 script login.vt100 passing 1 parameter:
  640.                 acs.
  641. --------------------------------------------------------------------------
  642. SB    Sends a break character to the host        (SCRIPT)
  643.     Format:            Note that any pending character to send
  644.     SB                is aborted by this call
  645. --------------------------------------------------------------------------
  646. SCREEN    Define the screen type                (INIT)
  647.     Format:
  648.     SCREEN type        type of screen to use
  649.     Example:
  650.     SCREEN WORKBENCH    use the workbench screen
  651.     SCREEN CUSTOM        use a custom screen
  652.  
  653.                 See also OVERSCAN, LINES and INTERLACE.
  654. --------------------------------------------------------------------------
  655. SEND    Sends a string or character to the host.    (SCRIPT)
  656.     Format:
  657.     SEND    "string"    Sends a string to the host. Beginning and
  658.                 ending double quotes (") are required. A
  659.                 carat (^) may be used to send control chars.
  660.                 Two carats transmits a carat character.  Two
  661.                 imbedded double quotes will send a one double
  662.                 quote.
  663.         SEND    chr        Sends a single character.
  664.         SEND    ^chr        Sends a single control character. The chr
  665.                 is NOT case sensitve
  666.     Example:
  667.     SEND    "mail"        Send the string mail
  668.     SEND    "dir^M"        Send the string dir followed by a <CR>
  669.     SEND    a        Send the letter a
  670.     SEND    ^C        Send a control C
  671.     SEND    "abc^^def"    Send the string abc^def
  672.     SEND    ^^        Send a control-uparrow
  673.     SEND    "        Send the '"' character
  674. --------------------------------------------------------------------------
  675. SENDF Send a file using the protocol specified in XPROTO    (SCRIPT)
  676.     Format:
  677.     SENDF file-spec
  678.     Example:
  679.     XPROTO XMODEMCRC    Select XMODEM CRC protocol
  680.     SENDF Foo        Send Foo using XMODEM CRC
  681. --------------------------------------------------------------------------
  682. SHARE Use the serial port in shared or exclusive mode        (INIT,SCRIPT)
  683.     Format:
  684.     SHARE ON/OFF or YES/NO    If ON or YES other programs that open the
  685.                 serial port in shared mode may be used
  686.                 (possibly via the EXTERNAL command.  If OFF
  687.                 or NO is specified then no other program may
  688.                 use the serial port while VT100 has it open.
  689.                 VT100 will close the serial port if SHARE
  690.                 OFF is specified and an EXTERNAL protocol
  691.                 routine is invoked and then re-open it once
  692.                 the protocol module is done.
  693.     Example:
  694.     SHARE ON        Open the serial port in shared mode
  695.     SHARE NO        Open the serial port in exclusive mode
  696. --------------------------------------------------------------------------
  697. SHORTCUT set a new shortcut command key          (INIT)
  698.     Format:
  699.     SHORTCUT cmd key        Sets key "key" to be the shortcut key for
  700.                                 script command "cmd".  A null key will
  701.                                 cause no shortcut to be available for this
  702.                                 command (menu-option).  Cmd may be one of
  703.                                 the following:
  704.               >> File items:   <<
  705.     SE    - Send file using XPROTO    RE    - Receive file using XPROTO
  706.     KG    - kermit get file        KB    - kermit bye (for server)
  707.     CAP    - ascii capture on/off
  708.               >> Mode (XPROTO) items: <<
  709.     ASC - ASCII "protocol"        XM    - XMODEM protocol
  710.     XMC    - XMODEM CRC protocol        KE    - Kermit protocol
  711.               >> Comm items:   <<
  712.     300     - Set Baud 300             1200    - Set Baud 1200
  713.     2400    - Set Baud 2400            4800    - Set Baud 4800
  714.     9600    - Set Baud 9600            NONE    - Set Parity none
  715.     MARK    - Set Parity mark          SPACE    - Set Parity space
  716.     EVEN    - Set Parity even          ODD    - Set Parity odd
  717.     IMAGE   - KERMIT transfer mode     TEXT    - KERMIT transfer mode
  718.     CONVERT - KERMIT transfer mode     AUTOCHOP    - Enable/disable XMODEM
  719.     STRIP   - Strip parity of serial          auto-chop feature
  720.           data destined for terminal
  721.               >> Script items: <<
  722.     EXECUTE - execute macro        ABORT    - abort macro
  723.     RX      - send AREXX command
  724.               >> Util items:   <<
  725.     SB      - send break        HANG    - hang up
  726.     CD      - change directory        CLEAR    - clear screen
  727.     ECH     - turn echo on or off    WRAP    - turn wrap on or off
  728.     NUMKEY  - turn numeric kpad on/off    APP    - turn app. cursor on/off
  729.     CON     - convert bs to del        SWAP    - Swap BS and DEL
  730.     MOUSEUP - send mouse UP events    MOUSEDN    - send mouse DOWN events
  731.  
  732.     Example:
  733.     SHORTCUT ASC Q          set Right-Amiga-Q to be the shortcut for
  734.                                 ASCII_SEND.
  735.     SHORTCUT XS             removes the shortcut key for sending via
  736.                                 XMODEM protocol
  737. --------------------------------------------------------------------------
  738. STRIP    Strip parity of data destined for terminal    (INIT,SCRIPT)
  739.     Format:
  740.         STRIP ON/OFF or YES/NO
  741.     Example:
  742.         STRIP ON    Prior to displaying data from the remote host,
  743.             remove the parity.  This will "clean up" displays
  744.             from hosts which can't or won't recognize your
  745.             parity settings.
  746. --------------------------------------------------------------------------
  747. SWAP    Swap the meanings of backspace and delete keys    (INIT,SCRIPT)
  748.     Format:
  749.     SWAP ON/OFF or YES/NO
  750.     Example:
  751.     SWAP NO        Use standard definitions
  752. --------------------------------------------------------------------------
  753. UNIT    Set unit of serial device to use        (INIT)
  754.     Format:
  755.     UNIT n
  756.     Example:
  757.     UNIT 1        Open unit 1 of the serial device.  Generally the
  758.             user will want to specify unit 0.  When multi-port
  759.             serial cards become available specify as necessary.
  760.             See also DEVICE.
  761. --------------------------------------------------------------------------
  762. VOLUME    Set the BELL volume                (INIT)
  763.     Format:
  764.     VOLUME n
  765.     Example:
  766.     VOLUME 0        Use a visual bell
  767.     VOLUME 64        Use a loud audible bell
  768. --------------------------------------------------------------------------
  769. WAIT    Suspends until a certain string is received.    (SCRIPT,NONREXX)
  770.     Format:
  771.     WAIT    "string"    Same rules for string as SEND
  772.     WAIT            Enter an endless wait. Usually used after
  773.                 some "ON" commands have been set up. Can
  774.                 still be aborted via the script menu.
  775.     Example:
  776.     WAIT    "User:"        Waits for the string User:
  777. --------------------------------------------------------------------------
  778. WBCOLORS Force usage of workbench colors        (INIT)
  779.     Format:
  780.     WBCOLORS ON/OFF or YES/NO
  781.     Example:
  782.     WBCOLORS YES        Workbebch colors will be used for all
  783. --------------------------------------------------------------------------
  784. WRAP    Set long line wrapping                (INIT,SCRIPT)
  785.     Format:
  786.     WRAP    ON/OFF or YES/NO
  787.     Example:
  788.     WRAP    ON        Long lines will wrap
  789. --------------------------------------------------------------------------
  790. XBEEP    Beep at end of xfer                (INIT,SCRIPT)
  791.     Format:
  792.     XBEEP    ON/OFF or YES/NO
  793.     Example:
  794.     XBEEP    ON        Beep when xfers are finished
  795. --------------------------------------------------------------------------
  796. XPROTO    Set default transfer protocol            (INIT,SCRIPT)
  797.     Format:
  798.     XPROTO    ASCII/XMODEM/XMODEMCRC/KERMIT/an external protocol
  799.     Example:
  800.     XPROTO    KERMIT        Sets transfer protocol to Kermit
  801. --------------------------------------------------------------------------
  802. XR    Receives a file via XMODEM.            (SCRIPT)
  803.     Format:
  804.     (same format as KS)
  805. --------------------------------------------------------------------------
  806. XS    Sends a file via XMODEM.            (SCRIPT)
  807.     Format:
  808.     (same format as KS)
  809. --------------------------------------------------------------------------
  810.  
  811.  
  812. ----------------------------
  813. Initialization file example:
  814. ----------------------------
  815.  
  816. #####################################################################
  817. #
  818. #    VT100 sample initialization file
  819. #    v2.9 ?????? ACS
  820. #
  821. # Hash mark at the beginning of a line denotes a comment.
  822. # White space (space(s) or tab(s)) delimit fields.
  823. # Case ignored except for function key bindings.
  824. #
  825. # All items in this file overide variables of the same name in VT100.C
  826. # (all variables in vt100.c have a "p_" prepended to them)
  827. #
  828. #####################################################################
  829. #
  830. APPCUR        ON        # Application keypad mode is being used
  831. AUTOCHOP    ON        # Allow XMODEM to strip NULL or ^Z from EOF
  832. BACKGROUND    000        # Colors are in hex RGB from 000 to FFF
  833. BAUD        2400        # Anything after required fields is ignored
  834. BOLD        a00        # Color for bold highlighting (in custom)
  835. BREAK        750000        # Break time in micro-seconds
  836. BUFFER        512        # 512 <= Input buffer size <= 2048
  837. CONVERT        ON        # KERMIT should downcase host names
  838. CURSOR        00a        # Color for cursor (in custom screen)
  839. DEPTH        1        # number of bit planes to use (1 or 2)
  840. ECHO        OFF        # Full duplex mode in use
  841. FONT        MyFont        # Use my own special 8-point font
  842. FOREGROUND    950        # Colors are only used on the custom screen
  843. INTERLACE    ON        # ON for CUSTOM or interlaced workbench
  844. KEYSCRIPT    7E        # Hex value for script introducer
  845. LINES        0        # normal <= 24 interlaced <= 48 or 0
  846. MODE        CRLF        # IMAGE or CRLF (for KERMIT transfers)
  847. NUMKEY        ON        # The keypad should be numeric
  848. PARITY        NONE        # NONE (= 8 bit), MARK, SPACE, ODD or EVEN
  849. SCREEN        CUSTOM        # may be CUSTOM or WORKBENCH
  850. SWAP        OFF        # Don't Swap the Back-space and Delete keys
  851. VOLUME        64        # Beep Volume (0 = Visual Beep)
  852. WBCOLORS    YES        # ignore custom colors and use defaults
  853. WRAP        OFF        # Auto wrap ON or OFF
  854. XBEEP        ON        # Beep when xfer is done
  855. XPROTO        XMODEMCRC    # Send/Receive will use Xmodem CRC.
  856. #   Remove the shortcut key for the CD command.  No comment on next line
  857. # as it will be taken as the shortcut key.
  858. SHORTCUT        CD
  859. #
  860. # Function bindings (strings to type when any of F1 - F10 are pressed)
  861. #    f <num>        = function key
  862. #    f <num>+10    = shifted function key
  863. #
  864. # The string specified must be the same format as the SEND command:
  865. #    ^    = control next character
  866. #    ^^    = up arrow
  867. #
  868. # Sample control characters:
  869. #    ^[    = escape    ^M    = carriage return
  870. #    ^J    = line feed    ^L    = form feed
  871. #
  872. # If the first character of the string is a script introducer
  873. # (KEYSCRIPT) then the string is interpreted as a script filename
  874. # to be executed when the key is pressed.
  875. #
  876. # Examples of bindings:
  877. #
  878. f 1    "^[OP"            # f1-f4 = PF1 - PF4 on a VT100
  879. f 2    "^[OQ"
  880. f 3    "^[OR"
  881. f 4    "^[OS"
  882. #
  883. # f5,6,7 = scripts to execute (assuming that KEYSCRIPT = '~' = 0x7E)
  884. #
  885. f 5    "~df1:vt100_source/dialwork.script"
  886. f 6    "~df1:vt100_source/sendvt100.script"
  887. f 7    "~df1:vt100_source/getpics.script"
  888. #
  889. f 8    "MAIL^M"        # Reads my mail (note embedded <CR>)
  890. f 9    "NOTE^M"        # Reads conferences
  891. f 11    "ATdt415-595-2479^M"    # dials the FAUG BBS
  892. #
  893. # all done with init, now execute script as startup sequence
  894. #
  895. exit df1:vt100_source/dialwork.script
  896.  
  897. --------------------
  898. Script file example:
  899. --------------------
  900.  
  901. ###################################################################
  902. # Script to dial work (dialwork.script)
  903. #    v2.6    870222    DBW
  904. ###################################################################
  905. #
  906. # Make sure that we have all the parameters we want
  907. #
  908.     DELAY    2
  909.     BAUD    2400
  910.     PARITY    NONE
  911.     MODE    CRLF
  912.     BREAK    750000
  913.     SB
  914. #
  915. # First get the modem's attention:
  916. #
  917. Start:
  918.     DELAY 1
  919.     ON "Ready" GOTO Dial
  920.     SEND ^B
  921.     DELAY 2
  922.     GOTO Start
  923. #
  924. # Now dial the 2400 baud line to work:
  925. #
  926. Dial:
  927.     ON "Attached" GOTO Login
  928.     SEND "$2400!"
  929.     DELAY 30
  930.     GOTO Start
  931. #
  932. # We got attached, so keep hitting return until the Gandalf terminal
  933. # handler wakes up:
  934. #
  935. Login:
  936.     ON "enter" GOTO Gandalf
  937.     DELAY 1
  938.     SEND ^M
  939.     GOTO Login
  940. #
  941. # Now connect from the Gandalf to the terminal server (ts2):
  942. # (when it asks for a password I need to type the password 
  943. # manually here)
  944. #
  945. Gandalf:
  946.     DELAY 2
  947.     SEND "ts2^M"
  948.     WAIT "class start"
  949. #
  950. # Keep sending <CR>'s until the LAT prompts for a username:
  951. #
  952. WaitLat:
  953.     DELAY 2
  954.     ON "username>" GOTO Lat
  955.     SEND ^M
  956.     GOTO WaitLat
  957. #
  958. # Tell the LAT that it's me, and connect to the "cookie cluster"
  959. # (my host systems). Tell the cluster my user name.
  960. # (when it asks for a password I need to type the password
  961. # manually here)
  962. #
  963. Lat:
  964.     SEND "wecker^M"
  965.     DELAY 1
  966.     SEND "connect cookie^M"
  967.     WAIT "Username:"
  968.     SEND "WECKER^M"
  969.     WAIT "at home"
  970.     SEND "^M^Mn^M"
  971. #
  972. # Got through all the LOGIN garbage, so let's do some work.
  973. #
  974.     WAIT "$ "
  975. #
  976. # All done so stop:
  977. #
  978.     EXIT
  979.