home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / comm / vt100.lha / vt100.doc < prev   
Text File  |  1990-02-14  |  36KB  |  945 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. CONVERT    Tell KERMIT whether or not to convert filenames    (INIT,SCRIPT)
  305.     Format:
  306.     CONVERT    ON/OFF or YES/NO
  307.     Example:
  308.     CONVERT    ON        Filenames will be down cased
  309. --------------------------------------------------------------------------
  310. CURSOR    Define a color for the cursor            (INIT)
  311.     Format:
  312.     (same as BACKGROUND)
  313. --------------------------------------------------------------------------
  314. DELAY    Suspends script file for a specified time    (SCRIPT)
  315.     Format:
  316.     DELAY    n        Suspends execution for n seconds
  317.     Example:
  318.     DELAY    2        Suspends for 2 seconds
  319. --------------------------------------------------------------------------
  320. DEPTH    Define the depth of the window/screen        (INIT)
  321.     Format:
  322.     DEPTH n        Number of planes in window/screen
  323.     Example:
  324.     DEPTH 1        Minimum depth
  325.     DEPTH 2        Same as Workbench
  326. --------------------------------------------------------------------------
  327. DEVICE    Define name of serial device handler to use    (INIT)
  328.     Format:
  329.     DEVICE name    Sets name of serial device handler to name
  330.     Example:
  331.     DEVICE newser.device    Set name of serial device handler to
  332.                 newser.device
  333.     DEVICE serial.device    Set name of serial device handler to the
  334.                 "default" (i.e. the C-A supplied device)
  335. --------------------------------------------------------------------------
  336. DISPLAY    Display data on the screen            (SCRIPT)
  337.     Format:
  338.     DISPLAY string    Displays string on the screen as though received from
  339.             the serial port (including escape sequence handling)
  340.     Example:
  341.     DISPLAY ^M        Causes VT100 to act as though a carriage-return
  342.                 were received over the serial port.
  343.     DISPLAY "^[[M"        Deletes the current line on the screen.
  344.     DISPLAY "Move^[[Aup one line"    Displays "Move" on the current line on
  345.                 the screen then moves the cursor up one line
  346.                 displays "up one line".
  347. --------------------------------------------------------------------------
  348. ECHO    Turn on/off local echo                (INIT,SCRIPT)
  349.     Format:
  350.     ECHO    ON/OFF or YES/NO
  351.     Example:
  352.     ECHO    ON        Half duplex mode
  353. --------------------------------------------------------------------------
  354. EXIT    Ends execution of the current script file.    (INIT,SCRIPT)
  355.     Format:
  356.     EXIT            Exit the current script/init file
  357.     EXIT VT100        Exit vt100 program (from SCRIPT only)
  358.     EXIT newscript        Exit this file and start up newscript
  359.     Example:
  360.     EXIT DF1:FOO.BAR    Exit the current file and start FOO.BAR
  361. --------------------------------------------------------------------------
  362. EXTERNAL    Define external transfer program    (INIT,SCRIPT)
  363.     Format:
  364.     EXTERNAL "mode-name" "send-pgm" "receive-pgm"
  365.                 Send-pgm and receive-pgm may contain the strings
  366.                 @LOCAL and @REMOTE which will cause VT100 to put
  367.                 up a requester asking for local and/or remote
  368.                 filenames.  These will be substituted in place
  369.                 of their respective parameters in the send-pgm
  370.                 and/or receive-pgm prior to invoking it/them.
  371.                 See also the description of the SHARE command.
  372.     Examples:
  373.     EXTERNAL "FOO" "foo baz" "baz foo"
  374.                 Define external transfer program which will
  375.                 be called FOO in the MODE menu.  Invoke foo
  376.                 passing baz to SEND files, invoke baz passing
  377.                 foo to RECEIVE files.
  378.     EXTERNAL "FOO" "foo @REMOTE baz" "baz @LOCAL @REMOTE foo"
  379.                 As above but display a requester for the remote
  380.                 filename (in the case of send) or both the
  381.                 local and remote filenames (in the case of
  382.                 receive).  The name(s) used to satisfy the
  383.                 requester(s) will be replaced in the parameter
  384.                 string to the appropriate program prior to
  385.                 its invocation.
  386.     EXTERNAL FOO        Remove definition of transfer pgm FOO
  387. --------------------------------------------------------------------------
  388. F    Define a function key or the mouse prefix    (INIT,SCRIPT)
  389.     Format:
  390.     F n string        Define Function key n to be string
  391.     F M string        Define the mouse prefix (the prefix sent to
  392.                 the host when a mouse button is used AND
  393.                 events are selected via the MOUSE command
  394.     Example:    (see SEND for string format)
  395.     F 1 "dir^M"        Define F1 is the string dir<cr>
  396.     F 11 "help"        Define Shifted F1 as the string help
  397.     F 20 ^C            Define Shifted F10 as a control-C
  398.     F M "^[O"        Send ESC-O before mouse data
  399. --------------------------------------------------------------------------
  400. FONT Specify font to use                (INIT)
  401.     Format:
  402.     FONT font-name
  403.     Example:
  404.     FONT point-font
  405. --------------------------------------------------------------------------
  406. FONTSIZE Specify font size to use            (INIT)
  407.     Format:
  408.     FONTSIZE font-size
  409.     Example:
  410.     FONTSIZE 8
  411. --------------------------------------------------------------------------
  412. FOREGROUND Define a color for the foreground        (INIT)
  413.     Format:
  414.     (same as BACKGROUND)
  415. --------------------------------------------------------------------------
  416. FORWARD Forward received data to an AREXX port        (REXXONLY)
  417.     Format:
  418.     FORWARD portname
  419.     Example:
  420.     FORWARD REXX-VT100    Sends received data to a port named
  421.                 REXX-VT100.  This command can (and probably
  422.                 WILL) cause you to GURU if you remove the
  423.                 port before you tell VT100 to quit
  424.                 forwarding data.
  425.     FORWARD            Tells VT100 to quit forwarding data
  426. --------------------------------------------------------------------------
  427. GOTO    Jumps to a different part of the script file.    (SCRIPT,NONREXX)
  428.     Format:
  429.     GOTO label        Jumps to a line beginning with label:.
  430.                 Jumps may be forward or backward.
  431.     Example:
  432.     FOO:            Sets up a label
  433.     ...
  434.     GOTO FOO        Jumps to FOO
  435. --------------------------------------------------------------------------
  436. INTERLACE Turn on/off interlace                (INIT)
  437.     Format:
  438.     INTERLACE ON/OFF or YES/NO or ASIS
  439.     Example:
  440.     INTERLACE ON        Use interlacing
  441.     INTERLACE ASIS        Use interlace if WBSCREEN uses it
  442. --------------------------------------------------------------------------
  443. KB    Send a BYE packet to a host KERMIT server.    (SCRIPT)
  444.     Format:
  445.     KB            Shut down server.
  446. --------------------------------------------------------------------------
  447. KEYSCRIPT Define a new keyscript character        (INIT,SCRIPT)
  448.     Format:
  449.     KEYSCRIPT hex        New character in hex
  450.     Example:
  451.     KEYSCRIPT 7E        Use "~" as the new character
  452. --------------------------------------------------------------------------
  453. KG    Gets files from host.                (SCRIPT)
  454.     Format:
  455.     (same format as KS)     Get from server
  456. --------------------------------------------------------------------------
  457. KMAXPACK Set maximum packet size for kermit transfers    (INIT,SCRIPT)
  458.     Format:
  459.     KMAXPACK n        Set maximum packet size to n
  460.     Example:
  461.     KMAXPACK 1000        Use long packets if possible.  Don't forget
  462.                 to increase the send/receive timeout values
  463.                 on your host!!!
  464. --------------------------------------------------------------------------
  465. KR    Receives a file from kermit host.        (SCRIPT)
  466.     Format:
  467.     (same format as KS)     Not from a server
  468. --------------------------------------------------------------------------
  469. KS    Sends files via kermit to the host.        (SCRIPT)
  470.     Format:
  471.     KS file            Send one file
  472.     KS file1,file2,...    Send multiple files
  473.     KS file1,file2,...,$    Send multiple files and shut down server
  474.     Example:
  475.     KS foo.bar        sends foo.bar (note no quoting is used)
  476.     KS foo1,foo2,foo3    sends three files
  477.     KS foo1,foo2,foo3,$    sends three files and shuts down server
  478. --------------------------------------------------------------------------
  479. LINES    Define number of lines in the window        (INIT)
  480.     Format:
  481.     LINES n
  482.     Example:
  483.     LINES 24        Maximum for non-interlace
  484.     LINES 48        Maximum for interlaced
  485.     LINES 0            Determine the maximum number of lines
  486.                 available and use it
  487. --------------------------------------------------------------------------
  488. MODE    Set a transfer mode for KERMIT to use        (INIT,SCRIPT)
  489.     Format:
  490.     MODE type        type of transfers to perform
  491.     Example:
  492.     MODE IMAGE        image mode transfers
  493.     MODE CRLF        <CR><LF> text transfers (VMS Kermit).
  494. --------------------------------------------------------------------------
  495. MOUSE    Enable reporting of mouse events to the host    (INIT,SCRIPT)
  496.     Format:
  497.     MOUSE BOTH/UP/DOWN/OFF
  498.     Example:
  499.     MOUSE OFF        Send no mouse events
  500.     MOUSE BOTH        Send both mouse up and down events
  501. --------------------------------------------------------------------------
  502. MSG    Cause VT100 to display a message        (SCRIPT)
  503.     Format:
  504.     MSG string    If string ends with a ^M then string will be displayed
  505.             and a subsequent MSG will overlay string.  If string
  506.             contains ^J then the text up to the ^J will be
  507.             displayed followed by a new-line followed by the
  508.             remainder of the text of string.
  509.     Example:    (see SEND for string format)
  510.     MSG "Show me this msg^J" Will display "Show me this msg" with a
  511.                 following new-line in the VT100 Info window.
  512.                 A subsequent MSG will overlay the text of this
  513.                 message.
  514.  
  515.     MSG "Show me^Mthis msg" Will display "Show me this msg" with a
  516.                 new-line after the words "me" and "msg".
  517.  
  518.                 See the SEND command for a more complete
  519.                 definition of string.
  520. --------------------------------------------------------------------------
  521. NUMKEY    Numeric keypad mode                (INIT,SCRIPT)
  522.     Format:
  523.     NUMKEY    ON/OFF or YES/NO
  524.     Example:
  525.     NUMKEY    ON        Keypad is pure numbers
  526. --------------------------------------------------------------------------
  527. ON    Peforms a command every time string is received    (SCRIPT)
  528.     Format:
  529.     ON      "string"  cmd    Execute cmd when string is received.
  530.                 Only one ON string may be installed at a
  531.                 time.
  532.  
  533.                 If cmd is a GOTO and we were previously
  534.                 WAITing for a string the WAIT is aborted
  535.                 and execution resumes at the new label.
  536.  
  537.                 If cmd is not SEND and we were previously
  538.                 DELAYing, then the DELAY is aborted and the
  539.                 cmd is executed, followed by the next
  540.                 command after the DELAY.
  541.  
  542.                 If cmd is a SEND and we were previously
  543.                 DELAYing, then the DELAY is continued.
  544.  
  545.                 If cmd is NULL (i.e. ON "") then the
  546.                 current ON command is aborted.
  547.     Example:
  548.     ON  "LOSS CARRIER" GOTO RESTART
  549.                 If modem drops carrier, try to redial
  550.     ON  "--more--" SEND " "
  551.                 Send a space every time --more-- is received
  552. --------------------------------------------------------------------------
  553. PARITY    Sets the parity                    (INIT,SCRIPT)
  554.     Format:
  555.     PARITY    type        Set the parity type
  556.                 Note that all received characters that are
  557.                 destined for the screen are subject to
  558.                 having their parity bits removed or left
  559.                 alone depending on the PARITY setting.
  560.                 Versions prior to 2.9 did not do this.  I
  561.                 corrected this bug but you should be aware
  562.                 that old scripts that depended on this
  563.                 incorrect behaviour will probably break.
  564.                 If, for example, you are connected to a
  565.                 host which uses MARK parity but you
  566.                 PARITY NONE you will most likely never
  567.                 match an ON string.
  568.     Example:
  569.     PARITY    NONE        no parity
  570.     PARITY    MARK        mark parity
  571.     PARITY    SPACE        space parity
  572.     PARITY    ODD        odd parity
  573.     PARITY    EVEN        even parity
  574. --------------------------------------------------------------------------
  575. RECF    Receive a file using the protocol specified in XPROTO    (SCRIPT)
  576.     Format:
  577.     RECF file-spec
  578.     Example:
  579.     XPROTO XMODEMCRC    Select XMODEM CRC protocol
  580.     RECF Foo        Receive Foo using XMODEM CRC
  581. --------------------------------------------------------------------------
  582. RX    Send a command to AREXX for processing        (INIT,SCRIPT)
  583.     Format:
  584.     RX    command args    Send command and args to AREXX
  585.     Example:
  586.     RX TRACE NOTHING    Cause AREXX to execute TRACE.VT100 passing
  587.                 one parameter ("NOTHING").
  588.  
  589.                 Note that it is normally unneccessary to use
  590.                 this command in other cases since VT100 will
  591.                 automatically route unknown commands to AREXX
  592.                 for processing.  However, if VT100 cannot
  593.                 communicate with AREXX at startup it will NOT
  594.                 automatically send cmds to AREXX and this
  595.                 command must be used.  In the normal case,
  596.                 though, this command will be used as the cmd
  597.                 option in an ON command.  Also note that AREXX
  598.                 macros are run asynchronously...you may get
  599.                 results that you don't expect so think about it
  600.                 if you want to try to run two or more AREXX
  601.                 macros sequentially.
  602.  
  603.                 See the section, above, on AREXX.
  604.  
  605.     Example:
  606.     ON "gin:" rx login acs    When "gin:" is received invoke the AREXX
  607.                 script login.vt100 passing 1 parameter:
  608.                 acs.
  609. --------------------------------------------------------------------------
  610. SB    Sends a break character to the host        (SCRIPT)
  611.     Format:            Note that any pending character to send
  612.     SB                is aborted by this call
  613. --------------------------------------------------------------------------
  614. SCREEN    Define the screen type                (INIT)
  615.     Format:
  616.     SCREEN type        type of screen to use
  617.     Example:
  618.     SCREEN WORKBENCH    use the workbench screen
  619.     SCREEN CUSTOM        use a custom screen
  620. --------------------------------------------------------------------------
  621. SEND    Sends a string or character to the host.    (SCRIPT)
  622.     Format:
  623.     SEND    "string"    Sends a string to the host. Beginning and
  624.                 ending double quotes (") are required. A
  625.                 carat (^) may be used to send control chars.
  626.                 Two carats transmits a carat character.  Two
  627.                 imbedded double quotes will send a one double
  628.                 quote.
  629.         SEND    chr        Sends a single character.
  630.         SEND    ^chr        Sends a single control character. The chr
  631.                 is NOT case sensitve
  632.     Example:
  633.     SEND    "mail"        Send the string mail
  634.     SEND    "dir^M"        Send the string dir followed by a <CR>
  635.     SEND    a        Send the letter a
  636.     SEND    ^C        Send a control C
  637.     SEND    "abc^^def"    Send the string abc^def
  638.     SEND    ^^        Send a control-uparrow
  639.     SEND    "        Send the '"' character
  640. --------------------------------------------------------------------------
  641. SENDF Send a file using the protocol specified in XPROTO    (SCRIPT)
  642.     Format:
  643.     SENDF file-spec
  644.     Example:
  645.     XPROTO XMODEMCRC    Select XMODEM CRC protocol
  646.     SENDF Foo        Send Foo using XMODEM CRC
  647. --------------------------------------------------------------------------
  648. SHARE Use the serial port in shared or exclusive mode        (INIT,SCRIPT)
  649.     Format:
  650.     SHARE ON/OFF or YES/NO    If ON or YES other programs that open the
  651.                 serial port in shared mode may be used
  652.                 (possibly via the EXTERNAL command.  If OFF
  653.                 or NO is specified then no other program may
  654.                 use the serial port while VT100 has it open.
  655.                 VT100 will close the serial port if SHARE
  656.                 OFF is specified and an EXTERNAL protocol
  657.                 routine is invoked and then re-open it once
  658.                 the protocol module is done.
  659.     Example:
  660.     SHARE ON        Open the serial port in shared mode
  661.     SHARE NO        Open the serial port in exclusive mode
  662. --------------------------------------------------------------------------
  663. SHORTCUT set a new shortcut command key          (INIT)
  664.     Format:
  665.     SHORTCUT cmd key        Sets key "key" to be the shortcut key for
  666.                                 script command "cmd".  A null key will
  667.                                 cause no shortcut to be available for this
  668.                                 command (menu-option).  Cmd may be one of
  669.                                 the following:
  670.               >> File items:   <<
  671.     SE    - Send file using XPROTO    RE    - Receive file using XPROTO
  672.     KG    - kermit get file        KB    - kermit bye (for server)
  673.     CAP    - ascii capture on/off
  674.               >> Mode (XPROTO) items: <<
  675.     ASC - ASCII "protocol"        XM    - XMODEM protocol
  676.     XMC    - XMODEM CRC protocol        KE    - Kermit protocol
  677.               >> Comm items:   <<
  678.     300     - Set Baud 300             1200    - Set Baud 1200
  679.     2400    - Set Baud 2400            4800    - Set Baud 4800
  680.     9600    - Set Baud 9600            NONE    - Set Parity none
  681.     MARK    - Set Parity mark          SPACE    - Set Parity space
  682.     EVEN    - Set Parity even          ODD    - Set Parity odd
  683.     IMAGE   - KERMIT transfer mode     TEXT    - KERMIT transfer mode
  684.     CONVERT - KERMIT transfer mode     AUTOCHOP    - Enable/disable XMODEM
  685.     STRIP   - Strip parity of serial          auto-chop feature
  686.           data destined for terminal
  687.               >> Script items: <<
  688.     EXECUTE - execute macro        ABORT    - abort macro
  689.     RX      - send AREXX command
  690.               >> Util items:   <<
  691.     SB      - send break        HANG    - hang up
  692.     CD      - change directory        CLEAR    - clear screen
  693.     ECH     - turn echo on or off    WRAP    - turn wrap on or off
  694.     NUMKEY  - turn numeric kpad on/off    APP    - turn app. cursor on/off
  695.     CON     - convert bs to del        SWAP    - Swap BS and DEL
  696.     MOUSEUP - send mouse UP events    MOUSEDN    - send mouse DOWN events
  697.  
  698.     Example:
  699.     SHORTCUT ASC Q          set Right-Amiga-Q to be the shortcut for
  700.                                 ASCII_SEND.
  701.     SHORTCUT XS             removes the shortcut key for sending via
  702.                                 XMODEM protocol
  703. --------------------------------------------------------------------------
  704. STRIP    Strip parity of data destined for terminal    (INIT,SCRIPT)
  705.     Format:
  706.         STRIP ON/OFF or YES/NO
  707.     Example:
  708.         STRIP ON    Prior to displaying data from the remote host,
  709.             remove the parity.  This will "clean up" displays
  710.             from hosts which can't or won't recognize your
  711.             parity settings.
  712. --------------------------------------------------------------------------
  713. SWAP    Swap the meanings of backspace and delete keys    (INIT,SCRIPT)
  714.     Format:
  715.     SWAP ON/OFF or YES/NO
  716.     Example:
  717.     SWAP NO        Use standard definitions
  718. --------------------------------------------------------------------------
  719. UNIT    Set unit of serial device to use        (INIT)
  720.     Format:
  721.     UNIT n
  722.     Example:
  723.     UNIT 1        Open unit 1 of the serial device.  Generally the
  724.             user will want to specify unit 0.  When multi-port
  725.             serial cards become available specify as necessary.
  726.             See also DEVICE.
  727. --------------------------------------------------------------------------
  728. VOLUME    Set the BELL volume                (INIT)
  729.     Format:
  730.     VOLUME n
  731.     Example:
  732.     VOLUME 0        Use a visual bell
  733.     VOLUME 64        Use a loud audible bell
  734. --------------------------------------------------------------------------
  735. WAIT    Suspends until a certain string is received.    (SCRIPT,NONREXX)
  736.     Format:
  737.     WAIT    "string"    Same rules for string as SEND
  738.     WAIT            Enter an endless wait. Usually used after
  739.                 some "ON" commands have been set up. Can
  740.                 still be aborted via the script menu.
  741.     Example:
  742.     WAIT    "User:"        Waits for the string User:
  743. --------------------------------------------------------------------------
  744. WBCOLORS Force usage of workbench colors        (INIT)
  745.     Format:
  746.     WBCOLORS ON/OFF or YES/NO
  747.     Example:
  748.     WBCOLORS YES        Workbebch colors will be used for all
  749. --------------------------------------------------------------------------
  750. WRAP    Set long line wrapping                (INIT,SCRIPT)
  751.     Format:
  752.     WRAP    ON/OFF or YES/NO
  753.     Example:
  754.     WRAP    ON        Long lines will wrap
  755. --------------------------------------------------------------------------
  756. XBEEP    Beep at end of xfer                (INIT,SCRIPT)
  757.     Format:
  758.     XBEEP    ON/OFF or YES/NO
  759.     Example:
  760.     XBEEP    ON        Beep when xfers are finished
  761. --------------------------------------------------------------------------
  762. XPROTO    Set default transfer protocol            (INIT,SCRIPT)
  763.     Format:
  764.     XPROTO    ASCII/XMODEM/XMODEMCRC/KERMIT/an external protocol
  765.     Example:
  766.     XPROTO    KERMIT        Sets transfer protocol to Kermit
  767. --------------------------------------------------------------------------
  768. XR    Receives a file via XMODEM.            (SCRIPT)
  769.     Format:
  770.     (same format as KS)
  771. --------------------------------------------------------------------------
  772. XS    Sends a file via XMODEM.            (SCRIPT)
  773.     Format:
  774.     (same format as KS)
  775. --------------------------------------------------------------------------
  776.  
  777.  
  778. ----------------------------
  779. Initialization file example:
  780. ----------------------------
  781.  
  782. #####################################################################
  783. #
  784. #    VT100 sample initialization file
  785. #    v2.9 ?????? ACS
  786. #
  787. # Hash mark at the beginning of a line denotes a comment.
  788. # White space (space(s) or tab(s)) delimit fields.
  789. # Case ignored except for function key bindings.
  790. #
  791. # All items in this file overide variables of the same name in VT100.C
  792. # (all variables in vt100.c have a "p_" prepended to them)
  793. #
  794. #####################################################################
  795. #
  796. APPCUR        ON        # Application keypad mode is being used
  797. AUTOCHOP    ON        # Allow XMODEM to strip NULL or ^Z from EOF
  798. BACKGROUND    000        # Colors are in hex RGB from 000 to FFF
  799. BAUD        2400        # Anything after required fields is ignored
  800. BOLD        a00        # Color for bold highlighting (in custom)
  801. BREAK        750000        # Break time in micro-seconds
  802. BUFFER        512        # 512 <= Input buffer size <= 2048
  803. CONVERT        ON        # KERMIT should downcase host names
  804. CURSOR        00a        # Color for cursor (in custom screen)
  805. DEPTH        1        # number of bit planes to use (1 or 2)
  806. ECHO        OFF        # Full duplex mode in use
  807. FONT        MyFont        # Use my own special 8-point font
  808. FOREGROUND    950        # Colors are only used on the custom screen
  809. INTERLACE    ON        # ON for CUSTOM or interlaced workbench
  810. KEYSCRIPT    7E        # Hex value for script introducer
  811. LINES        0        # normal <= 24 interlaced <= 48 or 0
  812. MODE        CRLF        # IMAGE or CRLF (for KERMIT transfers)
  813. NUMKEY        ON        # The keypad should be numeric
  814. PARITY        NONE        # NONE (= 8 bit), MARK, SPACE, ODD or EVEN
  815. SCREEN        CUSTOM        # may be CUSTOM or WORKBENCH
  816. SWAP        OFF        # Don't Swap the Back-space and Delete keys
  817. VOLUME        64        # Beep Volume (0 = Visual Beep)
  818. WBCOLORS    YES        # ignore custom colors and use defaults
  819. WRAP        OFF        # Auto wrap ON or OFF
  820. XBEEP        ON        # Beep when xfer is done
  821. XPROTO        XMODEMCRC    # Send/Receive will use Xmodem CRC.
  822. #   Remove the shortcut key for the CD command.  No comment on next line
  823. # as it will be taken as the shortcut key.
  824. SHORTCUT        CD
  825. #
  826. # Function bindings (strings to type when any of F1 - F10 are pressed)
  827. #    f <num>        = function key
  828. #    f <num>+10    = shifted function key
  829. #
  830. # The string specified must be the same format as the SEND command:
  831. #    ^    = control next character
  832. #    ^^    = up arrow
  833. #
  834. # Sample control characters:
  835. #    ^[    = escape    ^M    = carriage return
  836. #    ^J    = line feed    ^L    = form feed
  837. #
  838. # If the first character of the string is a script introducer
  839. # (KEYSCRIPT) then the string is interpreted as a script filename
  840. # to be executed when the key is pressed.
  841. #
  842. # Examples of bindings:
  843. #
  844. f 1    "^[OP"            # f1-f4 = PF1 - PF4 on a VT100
  845. f 2    "^[OQ"
  846. f 3    "^[OR"
  847. f 4    "^[OS"
  848. #
  849. # f5,6,7 = scripts to execute (assuming that KEYSCRIPT = '~' = 0x7E)
  850. #
  851. f 5    "~df1:vt100_source/dialwork.script"
  852. f 6    "~df1:vt100_source/sendvt100.script"
  853. f 7    "~df1:vt100_source/getpics.script"
  854. #
  855. f 8    "MAIL^M"        # Reads my mail (note embedded <CR>)
  856. f 9    "NOTE^M"        # Reads conferences
  857. f 11    "ATdt415-595-2479^M"    # dials the FAUG BBS
  858. #
  859. # all done with init, now execute script as startup sequence
  860. #
  861. exit df1:vt100_source/dialwork.script
  862.  
  863. --------------------
  864. Script file example:
  865. --------------------
  866.  
  867. ###################################################################
  868. # Script to dial work (dialwork.script)
  869. #    v2.6    870222    DBW
  870. ###################################################################
  871. #
  872. # Make sure that we have all the parameters we want
  873. #
  874.     DELAY    2
  875.     BAUD    2400
  876.     PARITY    NONE
  877.     MODE    CRLF
  878.     BREAK    750000
  879.     SB
  880. #
  881. # First get the modem's attention:
  882. #
  883. Start:
  884.     DELAY 1
  885.     ON "Ready" GOTO Dial
  886.     SEND ^B
  887.     DELAY 2
  888.     GOTO Start
  889. #
  890. # Now dial the 2400 baud line to work:
  891. #
  892. Dial:
  893.     ON "Attached" GOTO Login
  894.     SEND "$2400!"
  895.     DELAY 30
  896.     GOTO Start
  897. #
  898. # We got attached, so keep hitting return until the Gandalf terminal
  899. # handler wakes up:
  900. #
  901. Login:
  902.     ON "enter" GOTO Gandalf
  903.     DELAY 1
  904.     SEND ^M
  905.     GOTO Login
  906. #
  907. # Now connect from the Gandalf to the terminal server (ts2):
  908. # (when it asks for a password I need to type the password 
  909. # manually here)
  910. #
  911. Gandalf:
  912.     DELAY 2
  913.     SEND "ts2^M"
  914.     WAIT "class start"
  915. #
  916. # Keep sending <CR>'s until the LAT prompts for a username:
  917. #
  918. WaitLat:
  919.     DELAY 2
  920.     ON "username>" GOTO Lat
  921.     SEND ^M
  922.     GOTO WaitLat
  923. #
  924. # Tell the LAT that it's me, and connect to the "cookie cluster"
  925. # (my host systems). Tell the cluster my user name.
  926. # (when it asks for a password I need to type the password
  927. # manually here)
  928. #
  929. Lat:
  930.     SEND "wecker^M"
  931.     DELAY 1
  932.     SEND "connect cookie^M"
  933.     WAIT "Username:"
  934.     SEND "WECKER^M"
  935.     WAIT "at home"
  936.     SEND "^M^Mn^M"
  937. #
  938. # Got through all the LOGIN garbage, so let's do some work.
  939. #
  940.     WAIT "$ "
  941. #
  942. # All done so stop:
  943. #
  944.     EXIT
  945.