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