home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / c26_doc.zip / CASCRIPT.DOC next >
Text File  |  1990-04-27  |  256KB  |  8,415 lines

  1. COM-AND: IBM PC Communication Script Language
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.           ------------------------------------------
  18.           COM-AND:    Communications Script Language
  19.                  for the IBM PC
  20.           ------------------------------------------
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.     COM-AND is distributed freely and may be copied by anyone for
  33.     any number of machines, for purposes of evaluation.  The author
  34.     offers COM-AND and its accessory programs as a package, as
  35.     "shareware".  If you USE the program a registration of $35.00 is
  36.     required.  The author may be reached:
  37.  
  38.  
  39.                  CABER Software
  40.                  R. (Scott) McGinnis
  41.                  P.O. Box 3607 Mdse Mart
  42.                  Chicago, IL 60654-0607
  43.  
  44.                  PLINK, GEnie id: TARTAN
  45.                  CIS id: 73147,2665
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. Version 2.6: 900426
  55.  
  56. COM-AND: IBM PC Communication Script Language
  57.  
  58.  
  59.  
  60.  
  61.  
  62.     COM-AND version 2.6 is copyright 1990 CABER Software (R. Scott
  63.     McGinnis).  All rights are reserved world wide, excepting redistri-
  64.     bution under the ShareWare concept.  COM-AND is distributed freely
  65.     and may be copied by anyone for any number of machines, under the
  66.     ShareWare concept.
  67.  
  68.  
  69.     COM-AND is distributed as ShareWare.  You may use COM-AND without
  70.     charge for the purposes of evaluating its usefulness to you.  It is
  71.     suggested that this evaluation period be limited to a few days of
  72.     actual use.  If you find COM-AND to be worth continued use, then you
  73.     are asked to pay for it.  The payment is called a "registration
  74.     fee".  Complete the included registration form and mail it with your
  75.     payment.
  76.  
  77.  
  78.     Registration of COM-AND includes all published accessory programs
  79.     (which currently are PC-VCO, CCHESS, CBRIDGE, and CCOLOR), and
  80.     several utilities (unPACKIT and unSTUFIT).  Accessories and utili-
  81.     ties are published separately.    One registration covers the use
  82.     of any and all of these programs.
  83.  
  84.  
  85.     By registering your copy of COM-AND (or any ShareWare product), you
  86.     are promoting and supporting the convenient distribution method and
  87.     free evaluation policy that brought you this copy of COM-AND.
  88.  
  89.  
  90.     If you have received this copy from a Users' Group, "Software
  91.     Library" or "SIG", and have paid a small fee (usually $3 to $10),
  92.     you have NOT acquired a registration or continued right to use
  93.     COM-AND.  This fee was for the convenience of obtaining the diskette
  94.     with COM-AND on it.  The fee does NOT apply to the registration fee.
  95.  
  96.  
  97.     You may NOT distribute COM-AND or its documentation in connection
  98.     with ANY commercial venture, product, publication or service without
  99.     written approval.  COM-AND may not be disassembled or modified
  100.     without express written consent of its author.
  101.  
  102.  
  103.     COM-AND is supplied "as-is" with no warranties expressed or implied.
  104.     Neither CABER Software nor the author will be liable for any damages
  105.     or lost revenues incurred through the use of this program or any of
  106.     its accessories and utilities beyond the registration price paid.
  107.  
  108.  
  109. Version 2.6: 900426
  110.  
  111. COM-AND: IBM PC Communication Script Language
  112.  
  113.  
  114.  
  115.  
  116.  
  117.     COM-AND version 2.6 is available as shareware through PLINK, GEnie,
  118.     UNISON, NWI, Delphi and CIS.  COM-AND is also available through many
  119.     Bulletin Board systems.  Individuals are welcome to download COM-AND
  120.     for purposes of evaluation.
  121.  
  122.  
  123.     Commercial users of COM-AND must register COM-AND with the author or
  124.     one of the individuals listed here.  Site licenses (multiple copy
  125.     registrations) are available from:
  126.  
  127.  
  128.         CABER Software
  129.         R. (Scott) McGinnis
  130.         P.O. Box 3607 Mdse Mart
  131.         Chicago, IL 60654-0607
  132.  
  133.         PLINK, GEnie, Delphi ID: TARTAN
  134.         CIS id: 73147,2665
  135.  
  136.  
  137.     Commercial users of COM-AND may register it with the author above or
  138.     through:
  139.  
  140.  
  141.         SupportWare
  142.         Mike Todd
  143.         P.O. Box 14927
  144.         Long Beach, CA 90803-1449
  145.         (213) 439-6104
  146.  
  147.  
  148.     In Japan, COM-AND may be downloaded as shareware from PC-VAN.
  149.     COM-AND is available in Japan as a commercial product tailored for
  150.     specific machines through:
  151.  
  152.  
  153.         Discotel Japan (Ciari Soft)
  154.         Kurakuen 3 ban-cho 2-50
  155.         Nishinomiya 662
  156.         Japan
  157.  
  158.         Contact: Claude Ciari
  159.         Tel (0798)73-0052
  160.         PC-VAN NEC by Ciari
  161.         ID: CCIARI
  162.  
  163.  
  164. Version 2.6: 900426
  165.  
  166. COM-AND: IBM PC Communication Script Language
  167.  
  168.  
  169.                  Table of Contents
  170.                  -----------------
  171.  
  172. I.    COM-AND Introduction  ...................................... page 1
  173. II.    Script Introduction  ....................................... page 2
  174. III.    Definitions  ............................................... page 4
  175.  
  176.     A. Comments ................................................ page 4
  177.     B. Labels .................................................. page 4
  178.     C. Keywords ................................................ page 5
  179.     D. Commands ................................................ page 5
  180.     E. Strings ................................................. page 6
  181.     F. Numerics ................................................ page 7
  182.     G. States .................................................. page 8
  183.  
  184. IV.    Syntax    .................................................... page 9
  185. V.    Script Language Commands ................................... page 11
  186.  
  187.     Commands beginning "A"...................................... page 11
  188.     Commands beginning "B"...................................... page 14
  189.     Commands beginning "C"...................................... page 15
  190.     Commands beginning "D"...................................... page 20
  191.     Commands beginning "E"...................................... page 25
  192.     Commands beginning "F"...................................... page 28
  193.     Commands beginning "G"...................................... page 38
  194.     Commands beginning "H"...................................... page 42
  195.     Commands beginning "I"...................................... page 43
  196.     Commands beginning "J"...................................... page --
  197.     Commands beginning "K"...................................... page 51
  198.     Commands beginning "L"...................................... page 51
  199.     Commands beginning "M"...................................... page 53
  200.     Commands beginning "N"...................................... page 56
  201.     Commands beginning "O"...................................... page 57
  202.     Commands beginning "P"...................................... page 59
  203.     Commands beginning "Q"...................................... page 60
  204.     Commands beginning "R"...................................... page 61
  205.     Commands beginning "S"...................................... page 64
  206.     Commands beginning "T"...................................... page 74
  207.     Commands beginning "U"...................................... page 76
  208.     Commands beginning "V"...................................... page 76
  209.     Commands beginning "W"...................................... page 77
  210.     Commands beginning "X"...................................... page --
  211.     Commands beginning "Y"...................................... page --
  212.     Commands beginning "Z"...................................... page --
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Version 2.6: 900426
  220.  
  221. COM-AND: IBM PC Communication Script Language
  222.  
  223.  
  224.                  Table of Contents
  225.                  -----------------
  226.  
  227. VI.    SET Commands  .............................................. page 82
  228.  
  229.     A. Basic set ............................................... page 82
  230.     B. SET ASCII ............................................... page 96
  231.     C. SET KERMIT .............................................. page 97
  232.     D. SET ZMODEM .............................................. page 99
  233.  
  234. VII.    String Intrinsics  ......................................... page 100
  235. VIII.    Script Errors .............................................. page 104
  236. IX.    ASPECT and PROCOMM 2.4.2 scripts ........................... page 105
  237. X.    Program Requirements ....................................... page 107
  238. XI.    Program and Author Information    ............................ page 108
  239.  
  240.  
  241.                 Appendices
  242.                 ----------
  243.  
  244. A.    Sample scripts    ............................................ page 109
  245. B.    Host and BBS scripts  ...................................... page 112
  246. C.    External Protocol Drivers  ................................. page 113
  247. D.    Encoded Music  ............................................. page 115
  248. E.    File transfer error numbers  ............................... page 118
  249. F.    EBL  ....................................................... page 120
  250. G.    Manual setting and scripts ................................. page 121
  251.  
  252.     1. Alt-S (Setup window) .................................... page 121
  253.     2. Alt-O (Options window) .................................. page 122
  254.     3. Alt-P (Parameters window) ............................... page 123
  255.     4. Alt-K (KERMIT defaults window) .......................... page 123
  256.     5. Alt-J (Colors window) ................................... page 124
  257.     6. Help (General Help list) ................................ page 124
  258.  
  259. H.    STACK and Macro keycodes  .................................. page 126
  260. I.    Dynamic string variables ................................... page 127
  261. J.    Flow control methods ....................................... page 129
  262. K.    Machine language subroutines ............................... page 131
  263. L.    Script Language (version 1.x) .............................. page 134
  264. M.    Language Summary ........................................... page 137
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Version 2.6: 900426
  275.  
  276. COM-AND: IBM PC Communication Script Language                 Page   1
  277.  
  278.  
  279. I.    COM-AND Introduction
  280.  
  281.  
  282.     COM-AND for the IBM PC and compatibles is a communications program
  283.     that may be used by itself, or with several integrated accessory
  284.     programs (which themselves may be used independent of COM-AND).
  285.     COM-AND provides standard comm program functions:  a dialing
  286.     directory, macros, disk logging, binary and ASCII file transfers,
  287.     and most particularly: scripted execution.
  288.  
  289.  
  290.     COM-AND Version 2.6 executes as a CRT based comm program either in 25
  291.     line text mode on a CGA or monochrome screen, or 25/43 line mode on
  292.     an EGA display.  When an accessory is loaded through COM-AND (or when
  293.     COM-AND is loaded by an accessory), most of the functions of COM-AND
  294.     are available through the accessory.
  295.  
  296.  
  297.     COM-AND and its accessories (PC-VCO, CCHESS, CBRIDG, and CCOLOR) may
  298.     be copied freely and distributed to anyone for any number of
  299.     machines.  The author offers COM-AND as "shareware".  If the program
  300.     is used after a reasonable period of evaluation, a registration of
  301.     $35.00 is asked for the entire package.
  302.  
  303.  
  304.     COM-AND provides a script language for automation of certain tasks.
  305.     COM-AND is distributed with a KERMIT server, a HOST mode, a Bulletin
  306.     board, a file manager, and a LEARN MODE... all as scripts.  Scripts
  307.     may be written for COM-AND by anyone, requiring only an editor that
  308.     produces ASCII files.  COM-AND will execute scripts written for the
  309.     very popular PROCOMM communication program as well.
  310.  
  311.  
  312.     This document discusses scripted execution, and the COM-AND Script
  313.     Language.  The script language has grown over the years to the point
  314.     where its documentation requires a separate manual.  For manual use
  315.     of COM-AND, and functional overview, the reader is referred to the
  316.     document COM-AND.DOC.
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. Version 2.6: 900426
  330.  
  331. COM-AND: IBM PC Communication Script Language                 Page   2
  332.  
  333.  
  334. II.    Script Introduction
  335.  
  336.  
  337.     A script facility allows certain manual tasks to be automated, and
  338.     COM-AND to run unattended (if you have tested the script !!!).
  339.     Scripting is invoked in several ways:
  340.  
  341.     o    at load time:
  342.  
  343.         . COM-AND.CMD, if present in the current directory or the
  344.           subdirectory indicated by the 'COM-AND=' environment
  345.           variable, is executed immediately;
  346.  
  347.         . the /F switch in the run command may specify a script to
  348.           be executed immediately (after COM-AND.CMD, if present);
  349.  
  350.     o    interactively (through F2) as a script
  351.  
  352.     o    interactively (through F1) as an accessory or part of one
  353.  
  354.     o    a script may be attached to a dialing directory entry, to
  355.         be executed upon successful connection
  356.  
  357.  
  358.     Script commands are read by COM-AND from an ASCII file (word
  359.     processor files are not usually ASCII files!).    Programmer's text
  360.     editors and EDLIN (provided with DOS) may be used to create and
  361.     modify a script file.  If you wish to use a word processor to update
  362.     a script, first ensure that the particular word processor will output
  363.     an ASCII file (often called non-document format, perhaps even called
  364.     ASCII).
  365.  
  366.  
  367.     Once a script begins, execution of COM-AND is automatic, driven by
  368.     the script.  However, the ESC key may be used to terminate the
  369.     script at most any time (depending on the script.  The script author
  370.     might make ESC unusable).  During dialing, two ESCs are needed...
  371.     one to terminate the dial function, and the second to end script.
  372.  
  373.  
  374.     Generally speaking, a script usually takes the form:
  375.  
  376.         <perform some action>
  377.         <wait for an identifiable response>
  378.         <perform some action...
  379.         ... and so on
  380.  
  381.  
  382.  
  383.  
  384. Version 2.6: 900426
  385.  
  386. COM-AND: IBM PC Communication Script Language                 Page   3
  387.  
  388.  
  389. II.    Script Introduction (continued)
  390.  
  391.  
  392.     For example, a script might dial a number listed in the dialing
  393.     directory and wait for the "ID = " response from the dialed host.
  394.     The next action would be to send the logon ID, with a carriage
  395.     return and await a prompt for a password.
  396.  
  397.  
  398.     The scripts included with COM-AND are examples of such simple
  399.     scripts.  However:  the COM-AND script language is not limited to
  400.     communications related tasks...  programs may be loaded and passed
  401.     parameters, screen windows may be opened and scrolled, and so on.
  402.     A nontrivial BBS has been written using COM-AND's scripting, and is
  403.     provided with the distribution for the interested (and wary)!
  404.  
  405.  
  406.     It is taken for granted that the script programmer is acquainted with
  407.     the computer and telecommuncations environment in general, and the
  408.     COM-AND program in particular.    Much of the script language facility
  409.     revolves around making the features of COM-AND available to the
  410.     programmer.  After that, the remainder of the language makes the
  411.     computer (e.g.    read and write files), and the communications line
  412.     (e.g.  read and write lines of text) available to the programmer.
  413.  
  414.  
  415.     Details of the features of COM-AND are discussed in the COM-AND.DOC
  416.     document.  Much of the discussion to follow assumes familiarity with
  417.     that document.
  418.  
  419.  
  420.     The next few pages define terms used in discussing scripts and script
  421.     language elements.  Notational symbols will then be defined.  After
  422.     that, script language elements will be presented in detail.  Appendix
  423.     I summarizes the version 1.x script language.  Appendix J summarizes
  424.     the version 2 and 3.x languages.  Sample scripts are presented in
  425.     Appendix A.
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439. Version 2.6: 900426
  440.  
  441. COM-AND: IBM PC Communication Script Language                 Page   4
  442.  
  443.  
  444. III.    Definitions
  445.  
  446.  
  447.     A. Comments:
  448.  
  449.        Comments may be used (and are highly recommended!) alone on a
  450.        line, on a command line (after the command) or on a label line
  451.        (after the label).  A comment begins with a semi-colon or asterisk
  452.        and extends to the end of the line.
  453.  
  454.        Blank lines are also treated as comments, for phrasing.  Top-of-
  455.        form, appearing in the first column, is treated as a comment.
  456.  
  457.  
  458.     B. Labels:
  459.  
  460.        Labels are character strings terminated with a colon, not
  461.        including the characters:  blank, comma(,), exclamation (!),
  462.        number sign (#), dollar sign ($), percent sign (%), ampersand (&),
  463.        apostrophe ('), double quote ("), left and right parenthesis,
  464.        asterisk (*), plus (+), hyphen (-, minus), right slash (/), and
  465.        semi-colon(;).
  466.  
  467.        Only the first 8 characters of the label are significant to the
  468.        script processor; if two labels match for the first 8 characters,
  469.        the one closest to the beginning of the script will be used, and
  470.        the second ignored.
  471.  
  472.        Case is not significant in labels.
  473.  
  474.        Comments are allowed on a line with a label (comments begin with
  475.        semi-colon or asterisk and extending to the end of the line).
  476.  
  477.        Commands are not allowed on a line with a label.
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494. Version 2.6: 900426
  495.  
  496. COM-AND: IBM PC Communication Script Language                 Page   5
  497.  
  498.  
  499. III.    Definitions (continued)
  500.  
  501.  
  502.     C. Keywords:
  503.  
  504.        Keywords are alphanumeric character strings terminated by a blank,
  505.        a comma, a left parenthesis, or a semi-colon.  Only the first 4
  506.        characters of the keyword are significant to the script processor
  507.        (where keywords are the same for the first 4 letters, the last
  508.        letter is used to distinguish them).
  509.  
  510.  
  511.        Case is not significant in keywords.
  512.  
  513.  
  514.     D. Commands:
  515.  
  516.        Commands are structured:  <keyword> followed by arguments (if
  517.        any).  Delimiters between command arguments are blank and comma.
  518.        Each command is a line by itself (with the exception of the IF
  519.        statement which may contain a second command).  Comments are
  520.        allowed after the command (comments begin with semi-colon or
  521.        asterisk and extend to the end of the line).
  522.  
  523.  
  524.        COM-AND implements a stack for GOSUB, IF, SWITCH, FOR, DO and
  525.        WHILE commands.  This allows these commands to be nested to 20
  526.        levels.  A 'stack overflow' message is issued when nesting of more
  527.        than 20 is attempted.  A 'stack underflow' message is issued when
  528.        a RETURN is encountered for which no corresponding GOSUB was
  529.        issued.
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549. Version 2.6: 900426
  550.  
  551. COM-AND: IBM PC Communication Script Language                 Page   6
  552.  
  553.  
  554. III.    Definitions (continued)
  555.  
  556.  
  557.     E. Strings:
  558.  
  559.        String arguments are of two kinds:  literal and variable.  Literal
  560.        strings are enclosed in double quotes (").  The accent grave (`)
  561.        is used in a literal string to force the next character (e.g. the
  562.        string "`"" is a literal consisting of a double quote by itself).
  563.  
  564.  
  565.        String variables are referred to as S0, S1, ...  S29.  Each string
  566.        variable is 80 characters wide, and may be set with the Sx=,
  567.        ASSIGN, GET, and RGET statements.  They are set to blank when the
  568.        script begins (but are not reset to blanks when EXECUTE or FCALL
  569.        moves the script processor to a new script file).
  570.  
  571.  
  572.        Strings are manipulated internally exactly as given.  However,
  573.        when issued (to the console or out the comm port, or in some cases
  574.        to disk), or used in WHEN string, certain edits are performed:
  575.  
  576.        o       Trailing blanks are trimmed
  577.        o       "!" by itself (except "!!") is translated into a
  578.            carriage return
  579.        o       "^x" (except ^^) where 'x' is character "@" through "`"
  580.            is translated into the corresponding control character
  581.        o       Certain strings are treated as "intrinsic"s.  Refer
  582.            to chapter VII of this document for further discussion.
  583.  
  584.        Refer below to the "Sx = <expression>" discussion on page 74 for
  585.        details on string expressions.
  586.  
  587.  
  588.        Another set of string variables may be dynamically allocated by a
  589.        script (or scripts).  These variables are referred to as V0, V1,
  590.        ...    Vx, where 'x' is determined by the allocating script.
  591.        Dynamic string variables may be used anywhere static variables are
  592.        used, AFTER A SCRIPT ALLOCATES THEM.  Refer to appendix 'I' for a
  593.        discussion of these variables and their use.
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604. Version 2.6: 900426
  605.  
  606. COM-AND: IBM PC Communication Script Language                 Page   7
  607.  
  608.  
  609. III.    Definitions (continued)
  610.  
  611.  
  612.     F. Numerics:
  613.  
  614.        Numeric arguments are of two kinds:    literal and variable.  Lit-
  615.        eral numerics are values alone or within double quotes, or as a
  616.        string within a string variable.  Decimal values with the range
  617.        -32,768 to 32,767 are supported.  Hexadecimal values may be
  618.        specified using the 'C' convention (e.g.  0xffff is -1).
  619.  
  620.  
  621.        Numeric variables are referred to as N0, N1, ...  N99.  Each
  622.        numeric variable is capable of storing the value -32,768 to
  623.        32,767.  They are set to zero when the script begins (but are not
  624.        reset to zeroes when an EXECUTE or FCALL statement moves the
  625.        script processor to a new script file).
  626.  
  627.  
  628.        Refer below to the "Nx = <expression>" discussion on page 56 for
  629.        details on numeric expressions.  Numeric expressions are allowed
  630.        in place of single numeric values (where a value is required) in
  631.        all commands except:  ADD, SUB, MUL and DIV, IF EQ/LT/...  and IF
  632.        ZERO.  An expression may be used in these commands only if it is
  633.        entirely contained within parentheses.
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659. Version 2.6: 900426
  660.  
  661. COM-AND: IBM PC Communication Script Language                 Page   8
  662.  
  663.  
  664. III.    Definitions (continued)
  665.  
  666.  
  667.     G. States:
  668.  
  669.        o    String variables are set to blank at the start of a script.
  670.  
  671.        o    Numeric variables are set to zero at the start of a script.
  672.  
  673.        o    EXECUTE does not reset string or numeric variables or clear
  674.         any conditions (SUCCESS/FAILED/WAITFOR/etc).  Neither does
  675.         EXECUTE clear WHEN settings.
  676.  
  677.        o    EXECUTE clears any IF and SWITCH function and GOSUB stack.
  678.  
  679.        o    FCALL does not allow 'branch-back' from a called file to a
  680.         label in the calling file.  FCALL does not reset the ON
  681.         ESCAPE implicit GOSUB (which potentially is a branch-back),
  682.         so be careful!.
  683.  
  684.        o    GOTO must not be used to enter an IF clause or SWITCH case,
  685.         even from within an IF clause or SWITCH.
  686.  
  687.        o    Received text is not processed until RGET, PAUSE or WAITFOR
  688.         instructions are performed.
  689.  
  690.        o    Keystrokes entered during a script are transmitted out the
  691.         comm port (unless HITKEY or SET TTHRU has been invoked).
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714. Version 2.6: 900426
  715.  
  716. COM-AND: IBM PC Communication Script Language                 Page   9
  717.  
  718.  
  719. IV.    Syntax
  720.  
  721.  
  722.     The chapter defines symbols that will be used in command syntax
  723.     descriptions.  Of necessity, some will seem cryptic at first...
  724.     bear with me, please.
  725.  
  726.  
  727.     ->         Author's note.  The command highlighted with '->'
  728.              IS compatible with ASPECT scripting.
  729.  
  730.     *         Author's note.  The command highlighted with '*'
  731.              is documented for ASPECT compatiblity, but not
  732.              implemented in this version of COM-AND.
  733.  
  734.     [A]         optional keyword A
  735.  
  736.     (A!B!C...)   Required choice: A or B or C ...
  737.  
  738.     Sx         String variable S0,S1,S2...S29
  739.  
  740.     Nx         Numeric variable N0,N1,N2...N99
  741.  
  742.  ->    <label>      Label identifier     (1) literal value (e.g. LABEL)
  743.  ->                     (2) a string variable (e.g.  S0)
  744.  ->                         containing a label name
  745.                      (3) a quoted string (e.g.  "...")
  746.  
  747.  ->    <string>     Textual value, i.e. (1) a quoted string (e.g. "...")
  748.  ->                     (2) a string variable (e.g. S0)
  749.                      (3) a substring (e.g. S0(4:5),
  750.                          being position 4 through 5)
  751.                      (4) a string expression
  752.  
  753.  ->    <number>     Numeric value, i.e. (1) a quoted number (e.g. "4")
  754.  ->                     (2) a literal number (e.g. 555,
  755.                          or hex value e.g. 0xff)
  756.  ->                     (3) a numeric variable (e.g. N5)
  757.                      (4) a string variable (e.g. S0),
  758.                          which contains the value.
  759.                      (5) a numeric expression
  760.  
  761.     <row>         Numeric value representing a row number (0-24 or 0-42
  762.              according to the screen mode).  Expressions (e.g.
  763.              N0+1) are legitimate and accepted.
  764.  
  765.     <col>         Numeric value representing a column number (0-79).
  766.              Expressions are legitimate and accepted.
  767.  
  768.  
  769. Version 2.6: 900426
  770.  
  771. COM-AND: IBM PC Communication Script Language                 Page  10
  772.  
  773.  
  774. IV.    Syntax (continued)
  775.  
  776.  
  777.     <len>         Numeric value representing a length (0-79).  Expres-
  778.              sions (e.g. N0+1) are legitimate and accepted.
  779.  
  780.     <color>      Color keyword or value.  These are:
  781.  
  782.              0      Black            8    DkGrey (Dark Grey)
  783.              1      Blue               9    LtBlue
  784.              2      Green           10    LtGn (Light Green)
  785.              3      Cyan              11    LtCyan
  786.              4      Red              12    LtRed
  787.              5      Magenta          13    LtMagenta
  788.              6      Brown           14    Yellow
  789.              7      LtGrey (Light Grey) 15    White
  790.  
  791.               DEFAULT: This keyword specifies the foreground/
  792.               background attr set through Alt-J for menues.
  793.  
  794.               CONTRAST: This keyword specifies the foreground/
  795.               background attr (reversed) as specified through
  796.               Alt-J for menues.
  797.  
  798.               TEXT: This keyword specifies the foreground/
  799.               background as specified through Alt-J for text.
  800.  
  801.               TCONTRAST: This keyword specifies the foreground/
  802.               background (reversed) text as specified in Alt-J.
  803.  
  804.  ->    <attr>         A foreground/background attribute.  This may be
  805.  ->             of two forms: 0-255 (background value*16+foreground)
  806.  
  807.              and:       ([<color>] <color>).
  808.              or        ([DEFAULT] DEFAULT)
  809.              or        ([CONTRAST] CONTRAST)
  810.              or        any mix of the above
  811.  
  812.              For example "15" and "(black white)" are equivalent
  813.              attributes to COM-AND.  "(DEFAULT)" sets the attribute
  814.              the default set through Alt-J for menu windows.
  815.  
  816.     #         A single digit
  817.  
  818.     (#)         A digit within literal parenthesis
  819.  
  820.  
  821.  
  822.  
  823.  
  824. Version 2.6: 900426
  825.  
  826. COM-AND: IBM PC Communication Script Language                 Page  11
  827.  
  828.  
  829. V.    Script Language Commands
  830.  
  831.  
  832.     ACCESSORY <string>             or ACCESSORY <number>
  833.  
  834.          The ACCESSORY statement invokes the accessory directory to
  835.          (optionally) execute a new script, and (optionally) load a
  836.          program.  The accessory directory entry number specified is in
  837.          <string>.    <String> is formatted exactly as with the F1 menu; it
  838.          consists of an entry number 1-50.    Examples:
  839.  
  840.          ACCESSORY 1         ; Load entry 1
  841.          ; Nothing past this point in the script will be performed.
  842.  
  843.          Each accessory entry specifies:
  844.  
  845.          o         A drive:subdirectory (optional)
  846.          o         A script to be executed (optional)
  847.          o         A program invocation (optional)
  848.  
  849.          Accessory entries are constructed and modified with the 'r' sub-
  850.          command of the F1 menu or SET ACCESSORY script commands.
  851.  
  852.          The ACCESSORY command terminates the current script file.    The
  853.          current script file is closed (and not re-entered when the new
  854.          file completes).  Any IF/GOSUB/SWITCH commands in effect are
  855.          cleared.
  856.  
  857.          Unlike EXECUTE, all strings and conditions are cleared when the
  858.          Accessory script (if there is one) begins.  Parameters may not
  859.          therefore be passed to an accessory script (yet!).
  860.  
  861.  ->    ADD Nx Ny Nz
  862.  
  863.          The ADD command performs the instruction:    Nz = Nx+Ny.  No error
  864.          checking is performed; should the value exceed the range of a
  865.          numeric variable, results are unpredictable.  Example:
  866.  
  867.  ->         ADD N1 N2 N3         ; N3 = N1+N2
  868.  
  869.          An expression may be used for Nx or Ny if it is entirely
  870.          contained within parentheses.
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879. Version 2.6: 900426
  880.  
  881. COM-AND: IBM PC Communication Script Language                 Page  12
  882.  
  883.  
  884. V.    Script Language Commands (continued)
  885.  
  886.  
  887.  ->    ALARM [<number>]
  888.  
  889.          The ALARM command sounds COM-AND's alarm.  The alarm continues
  890.          for the time in seconds specified through the Alt-S 'Display
  891.          duration', unless overridden by the optional numeric argument.
  892.          Any keypress terminates the alarm.  Example:
  893.  
  894.  ->         ALARM 10                 ; Annoy for 10 seconds
  895.  
  896.     ALOAD <string>
  897.  
  898.          The ALOAD statement loads a new Accessory Definition file (F1).
  899.          The ALOAD command requires a file name in <string>.  <String>
  900.          contains an unqualified file.ext (or may contain -> a fully
  901.          pathed file name).  Example:
  902.  
  903.          ALOAD "COM-AND.ACC"             ; Load original accessory def
  904.          ALOAD "C:\SOURCE\COM-AND.ACC"   ; Load special definitions
  905.  
  906.          Note:  The file name is limited to 27 characters in length.
  907.  
  908.     ALLOCATE <number>
  909.  
  910.          The ALLOCATE statement allocates up to 100 dynamic variables
  911.          referenced V0, V1, ... for use by the current and subsequent
  912.          scripts.  ALLOCATE returns success/failure according to avail-
  913.          able memory.  Please refer to Appendix I for a discussion of
  914.          dynamic allocation of variables.  Example:
  915.  
  916.          ALLOCATE N0             ; Allocate a dynamic area
  917.  
  918.          Note:  The number of dynamic variables is limited to 100.
  919.  
  920.     ANAME Sx <number>
  921.  
  922.          The ANAME command returns the name field from the accessory
  923.          directory.  A directory number (1-50) must be specified.
  924.          Example:
  925.  
  926.          ANAME S0 5              ; Fetch the name from # 5
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934. Version 2.6: 900426
  935.  
  936. COM-AND: IBM PC Communication Script Language                 Page  13
  937.  
  938.  
  939. V.    Script Language Commands (continued)
  940.  
  941.  
  942.     APGM Sx <number>
  943.  
  944.          The APGM command returns the program invocation field from the
  945.          accessory directory.  A directory number (1-50) must be speci-
  946.          fied.  Example:
  947.  
  948.          APGM S0 5                 ; Fetch the pgm from # 5
  949.  
  950.     ASCRIPT Sx <number>
  951.  
  952.          The ASCRIPT command returns the script field from the
  953.          accessory directory.  A directory number (1-50) must be
  954.          specified.  Example:
  955.  
  956.          ASCRIPT S0 5             ; Fetch the name from # 5
  957.  
  958.  ->    ASSIGN Sx <string>
  959.  
  960.          The ASSIGN statement allows a string variable to be set to a
  961.          value.  The value may be another string variable, a literal
  962.          textual value (a quoted string), or a substring.  Examples:
  963.  
  964.  ->         ASSIGN S0 "MAIL"        ; S0 now contains "MAIL"
  965.  ->         ASSIGN S1 S0         ; S1 now contains "MAIL"
  966.          ASSIGN S2 S0(0:1)         ; S2 now contains "MA" (char0:char1)
  967.  
  968.     ASUBDIR Sx <number>
  969.  
  970.          The ASUBDIR command returns the subdirectory field from the
  971.          accessory directory.  A directory number (1-50) must be
  972.          specified.  Example:
  973.  
  974.          ASUBDIR S0 5             ; Fetch the subdir from # 5
  975.  
  976.  ->    ATGET row col attr len Sx
  977.  
  978.          The ATGET statement performs the GET function, i.e.  reading
  979.          the keyboard for a length, with cursor positioning and color
  980.          control.  Example:
  981.  
  982.  ->         ATGET 0 0 15 5 S5         ; Read up to 5 chars into S5 from 0,0
  983.          ATGET 0 0 (black white) 5 S5
  984.  
  985.          Note that the cursor is left positioned after the last
  986.          character read.
  987.  
  988.  
  989. Version 2.6: 900426
  990.  
  991. COM-AND: IBM PC Communication Script Language                 Page  14
  992.  
  993.  
  994. V.    Script Language Commands (continued)
  995.  
  996.  
  997.  ->    ATOI Sx Nx
  998.  
  999.          The ATOI statement converts a value in a string variable to a
  1000.          numeric variable.    If no numeric value is found, or the value ->
  1001.          exceeds the range for numeric variables, the ERROR flag is set.
  1002.          Examples:
  1003.  
  1004.  ->         ASSIGN S0 "1234"        ; S0 now contains "1234"
  1005.  ->         ATOI S0 N1          ; N1 now contains 1234
  1006.          ATOI S2(2:3) N2         ; N2 now contains 34 (char2:char3)
  1007.  
  1008.  ->    ATSAY row col attr <string>
  1009.  
  1010.          The ATSAY statement performs the MESSAGE function, i.e.
  1011.          writing to the screen, with cursor positioning and color
  1012.          control.  Example:
  1013.  
  1014.  ->         ATSAY 0 0 15 "text"     ; Write at 0,0; white on black
  1015.          ATSAY 0 0 (black white) S5
  1016.  
  1017.          Note that the cursor is left positioned after the last
  1018.          character written.
  1019.  
  1020.     ATSCR row col len Sx
  1021.  
  1022.          The ATSCR statement reads the screen starting at the position
  1023.          indicated by <row> and <col>, for the length specified into the
  1024.          string variable Sx.  The screen display characters (not their
  1025.          color attributes) are copied into Sx.  Example:
  1026.  
  1027.          ATSCR 2 0 80 S5         ; Read the whole of line 2 into S5
  1028.  
  1029.  ->    BOX row col row col attr
  1030.  
  1031.          The BOX statement draws a box over a region on the screen,
  1032.          filling the space within with a specified color.  The first and
  1033.          second arguments specify the row/column of the top-left of the
  1034.          region.  The third and fourth arguments specify the row/column
  1035.          of the bottom-right of the region.  The last argument specifies
  1036.          the color attribute to be used for the characters written.
  1037.  
  1038.  ->         BOX 0 10,10 20,20 15    ; White on black:    narrow box
  1039.          BOX 0 10,10 20,20 (black white)
  1040.  
  1041.  
  1042.  
  1043.  
  1044. Version 2.6: 900426
  1045.  
  1046. COM-AND: IBM PC Communication Script Language                 Page  15
  1047.  
  1048.  
  1049. V.    Script Language Commands (continued)
  1050.  
  1051.  
  1052.  ->    BREAK [<number>]
  1053.  
  1054.          The BREAK statement performs a true break.  The length of the
  1055.          BREAK is set (by default) through the Alt-S menu.    The length
  1056.          of the signal optionally may be specified in milliseconds.
  1057.          Example:
  1058.  
  1059.  ->         BREAK 1500          ; Send a 1.5 second break
  1060.  
  1061.  ->    BYE
  1062.  
  1063.          The BYE statement terminates both the script and COM-AND,
  1064.          leaving DTR as-is (connection, if made, is not broken).  It may
  1065.          be coded at any level (for example within a subroutine reached
  1066.          through a call from a subroutine).  Example:
  1067.  
  1068.  ->         BYE             ; Leave connection open
  1069.          ; Nothing past this point in the script is executed
  1070.  
  1071.          Note also the QUIT command.
  1072.  
  1073.  ->    CASE (<string>!<numeric>)
  1074.  
  1075.          The CASE statement must be contained within the domain of a
  1076.          SWITCH/ENDSWITCH pair.  The CASE statement specifies a value
  1077.          against which the string variable identified is tested.  Case
  1078.          is not signifigant in the comparison.  If the variable matches
  1079.          the given string (shift case excluded), the statements following
  1080.          the CASE will be executed, until an ENDCASE is encountered.
  1081.          Refer to SWITCH for an example.
  1082.  
  1083.          Note that the argument of a CASE statement may be a literal or
  1084.          variable value.  Both string and numeric variables are allowed.
  1085.          String substring extraction (e.g.    S0(5:10)) is also supported.
  1086.  
  1087.  ->    CHDIR <string>
  1088.  
  1089.          The CHDIR statement changes the current default subdirectory
  1090.          used for unqualified file name references.  Examples:
  1091.  
  1092.  ->         CHDIR "\COM-AND"        ; Change path on the current drive
  1093.          CHDIR "C:\COM-AND"      ; Change drive and path
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099. Version 2.6: 900426
  1100.  
  1101. COM-AND: IBM PC Communication Script Language                 Page  16
  1102.  
  1103.  
  1104. V.    Script Language Commands (continued)
  1105.  
  1106.  
  1107.  ->    CLEAR [<attr>]
  1108.  
  1109.          The CLEAR statement clears the screen.  It optionally changes
  1110.          the background and foreground colors.  The <attr> argument
  1111.          specifies a new background color (if present), and a new
  1112.          foreground color.    Note that a foreground argument requires a
  1113.          background argument.  Example:
  1114.  
  1115.  ->         CLEAR 15             ; Clear screen, set white on black
  1116.          CLEAR (BLACK RED)         ; Clear screen, set red on black
  1117.          CLEAR             ; Clear screen, leave colors alone
  1118.  
  1119.          CLEAR sets the cursor to the top left of the scrolling region,
  1120.          either as defined by default, or through the DWINDOW command.
  1121.  
  1122.     CLOG OPEN <string>
  1123.     CLOG CLOSE
  1124.     CLOG <string>
  1125.  
  1126.          The CLOG subcommands OPEN a call-log file by name, CLOSE an
  1127.          open call-log file, and write to the call-log (if open).
  1128.  
  1129.          The CLOG OPEN command requires a file name.  The <string> is
  1130.          limited to 26 characters in length.  It may contain a fully
  1131.          pathed file name.    The given name will be searched for on the
  1132.          current drive:subdirectory and the one specified by the
  1133.          'COM-AND=' environment variable.  Example:
  1134.  
  1135.          CLOG OPEN "Log.txt"     ; Open calllog file and start logging
  1136.          CLOG OPEN "E:log.txt"   ; Open calllog on RAM drive
  1137.  
  1138.          CLOG OPEN sets the SUCCESS/FAILURE condition (tested with the
  1139.          IF statement).
  1140.  
  1141.          Note that the script write may choose to open a call-log file
  1142.          by name (closing the default call-log, if one is established)
  1143.          or alternatively to accept the user's discretion in the matter.
  1144.          The CLOG command writes to the call-log only if it is open.  If
  1145.          the script writer does not open the call-log (CLOG OPEN or SET
  1146.          CALLLOG ON), CLOG commands will be ignored unless call-logging
  1147.          has been enabled BY THE USER.
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154. Version 2.6: 900426
  1155.  
  1156. COM-AND: IBM PC Communication Script Language                 Page  17
  1157.  
  1158.  
  1159. V.    Script Language Commands (continued)
  1160.  
  1161.  
  1162.  ->    COLOR <attr>
  1163.  
  1164.          The COLOR statement changes the foreground (and optionally the
  1165.          background display colors.  The first argument specifies a new
  1166.          background color.    The second argument specifies a new fore-
  1167.          ground color.  Note that a background argument requires a fore-
  1168.          ground argument.  Example:
  1169.  
  1170.  ->         COLOR 15             ; Set white on black
  1171.          COLOR (0 15)         ; Set white on black
  1172.          COLOR (BLACK RED)         ; Set red on black
  1173.          COLOR (RED)         ; Set foreground to red
  1174.  
  1175.     COMBASE <port> Nx
  1176.  
  1177.          The COMBASE statement returns the base address for the given
  1178.          port (port is COM1, COM2...).  This value may be set through
  1179.          Alt-P (manually) or SET COMBASE in a script.
  1180.  
  1181.          COMBASE COM1 N0         ; Read current base address
  1182.  
  1183.     COMPARMS Sx
  1184.  
  1185.          The COMPARMS statement returns the current communications
  1186.          parameters, formatted:  "bbbb,p,d,s,COMx" where "bbbb" is
  1187.          baud rate, "p" is parity (E/O/N), "d" is the number of data
  1188.          bits (7/8), "s" is the number of stop bits (1/2), and "COMx"
  1189.          is the comm port.    Example:
  1190.  
  1191.          COMPARMS S4         ; Read current settings
  1192.  
  1193.     COMVECTOR <port> Nx
  1194.  
  1195.          The COMVECTOR statement returns the vector # (0-7) for the
  1196.          given port (port is COM1, COM2...).  This value may be set
  1197.          through Alt-P (manually) or SET COMVECTOR in a script.
  1198.  
  1199.          COMVECTOR COM1 N0         ; Read current vector #
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209. Version 2.6: 900426
  1210.  
  1211. COM-AND: IBM PC Communication Script Language                 Page  18
  1212.  
  1213.  
  1214. V.    Script Language Commands (continued)
  1215.  
  1216.  
  1217.     CONCAT Sx [(##)!*] <string>
  1218.  
  1219.          The CONCAT statement concatenates two strings.  The first
  1220.          string is the target variable (Sx).  The second string is the
  1221.          text to be concatenated.  Concatenation may take place at a
  1222.          fixed position in the target, or the target may be backscanned
  1223.          for the last nonblank character.  Example:
  1224.  
  1225.          S1 = "MAIL"             ; Set file name 1st 4 char
  1226.          CONCAT S0 "_DATE"(0:1)  ; Take month num from date
  1227.          CONCAT S0 "_DATE"(3:4)  ; Take day num from date
  1228.          CONCAT S0(8) ".TXT"     ; Add extension at column 8
  1229.  ->         LOG OPEN S0         ; Open log file "MAILmmdd.TXT"
  1230.  
  1231.          Note that "*" may be specified instead of an index (0,1,2...)
  1232.          after the target variable.  "*" specifies that the concaten-
  1233.          ation is to be performed without blank trimming.  Example:
  1234.  
  1235.          CONCAT S0 * S1         ; Concat S1 at LENGTH S0
  1236.  
  1237.  ->    CONNECT
  1238.  
  1239.          The CONNECT statement terminates a COM-AND script, returning to
  1240.          CRT mode.    It may be coded at any level (for example within a
  1241.          subroutine reached through a call from a subroutine).  Example:
  1242.  
  1243.  ->         CONNECT             ; End of script
  1244.          ; Nothing past this point in the script is executed
  1245.  
  1246.          Note also the EXIT and TERMINAL command.
  1247.  
  1248.     CRC <string> Nx
  1249.  
  1250.          The CRC statement computes a CRC for the string given.  This
  1251.          CRC might be transmitted after the string to automate error
  1252.          detection and recovery.  Example:
  1253.  
  1254.          CRC S0(0:19) N0         ; Compute CRC for 20 characters
  1255.          S0(20:24) = N0         ; Add CRC to the string
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264. Version 2.6: 900426
  1265.  
  1266. COM-AND: IBM PC Communication Script Language                 Page  19
  1267.  
  1268.  
  1269. V.    Script Language Commands (continued)
  1270.  
  1271.  
  1272.     CTOI <string> Nx
  1273.  
  1274.          The CTOI statement converts a string (1st byte) to a numeric
  1275.          variable.    Only a single character is extracted.  The value in
  1276.          the numeric variable is the character.  Example:
  1277.  
  1278.          S0 = "A"                ; Place something in a string
  1279.          CTOI S0 N0          ; N0 now contains a 65 (ASCII "A")
  1280.  
  1281.  ->    CUROFF
  1282.  
  1283.          The CUROFF statement turns off the blinking cursor.  The cursor
  1284.          will be restored by the CURON command or upon exit.  Example:
  1285.  
  1286.  ->         CUROFF             ; Turn off the cursor
  1287.  
  1288.  ->    CURON
  1289.  
  1290.          The CURON statement restores on the blinking cursor.  This has
  1291.          no effect unless a CUROFF was performed previously.  Example:
  1292.  
  1293.  ->         CURON             ; Turn back on the cursor
  1294.  
  1295.  ->    CURSOR Nx Ny
  1296.  
  1297.          The CURSOR statement reads the current cursor position.  Nx
  1298.          returns the row number, and Ny returns the column number.
  1299.          Example:
  1300.  
  1301.  ->         CURSOR N0,N1         ; Read current cursor row,col
  1302.  
  1303.  ->    CWHEN [(#)]
  1304.  
  1305.          The CWHEN statement clears a WHEN setting.  10 WHEN settings are
  1306.          available (WHEN (0), WHEN (1) ...    WHEN (9), with the unquali-
  1307.          fied WHEN equivalent to WHEN(0)).    Each must be set and cleared
  1308.          individually.  Examples:
  1309.  
  1310.  ->         CWHEN             ; Clear primary WHEN setting
  1311.          CWHEN (0)             ; Same as CWHEN
  1312.          CWHEN (9)             ; Clear last WHEN
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319. Version 2.6: 900426
  1320.  
  1321. COM-AND: IBM PC Communication Script Language                 Page  20
  1322.  
  1323.  
  1324. V.    Script Language Commands (continued)
  1325.  
  1326.  
  1327.  ->    DATE Sx [0!1]
  1328.  
  1329.          The DATE statement stores the current system date into the
  1330.          target variable.  Example:
  1331.  
  1332.  ->         DATE S0             ; Get today's date
  1333.  
  1334.          The date is formatted according to the optional argument (if
  1335.          provided and nonzero, the date is formatted mm/dd/yyyy;
  1336.          otherwise it is formatted mm/dd/yy).
  1337.  
  1338.     DEALLOCATE
  1339.  
  1340.          The DEALLOCATE statement deallocates dynamic variables if they
  1341.          are currently allocated.  Example:
  1342.  
  1343.          DEALLOCATE          ; DEALLOCATE dynamic variables
  1344.  
  1345.  ->    DEC Nx
  1346.  
  1347.          The DEC command performs the instruction:    Nx = Nx-1.  No error
  1348.          checking is performed; should the value exceed the range of a
  1349.          numeric variable, results are unpredictable.  Example:
  1350.  
  1351.  ->         DEC N1             ; N1 = N1-1
  1352.  
  1353.     DECRYPT <string> <string> <string>
  1354.  
  1355.          The DECRYPT command decrypts a file (named in the first arg-
  1356.          ument) to a new file (named in the second argument, which will
  1357.          be purged if it exists) using a 32 character password (the third
  1358.          argument).  SUCCESS/FAILURE is set by DECRYPT.  Do not decrypt
  1359.          in place!    Example:
  1360.  
  1361.          DECRYPT "SECRET.ENF" "COM-AND.EXE" "abcdefghijklmnop"
  1362.  
  1363.  ->    DEFAULT
  1364.  
  1365.          The DEFAULT statement must be contained within the domain of a
  1366.          SWITCH/ENDSWITCH pair.  The DEFAULT statement specifies a domain
  1367.          of statements to be executed if none of the preceding CASE
  1368.          statements have been executed.  The DEFAULT does not have to be
  1369.          the last statement in the SWITCH domain...  but should be.  The
  1370.          DEFAULT case is terminated when an ENDCASE is encountered.
  1371.          Refer to SWITCH for an example.
  1372.  
  1373.  
  1374. Version 2.6: 900426
  1375.  
  1376. COM-AND: IBM PC Communication Script Language                 Page  21
  1377.  
  1378.  
  1379. V.    Script Language Commands (continued)
  1380.  
  1381.  
  1382.     DEFTIME <number>
  1383.  
  1384.          The DEFTIME statement sets the default delay for the RGET,
  1385.          WAITFOR, and PAUSE statements.  <number> is a delay interval
  1386.          in seconds.  Example:
  1387.  
  1388.          DEFTIME 60          ; Set original default value back
  1389.  
  1390.     DELETE <file>
  1391.  
  1392.          The DELETE statement deletes a file named in the command.
  1393.          The SUCCESS flag is set according to the result of the command.
  1394.          Example:
  1395.  
  1396.          DELETE "COM-AND.LOG"    ; Delete file on the default d:subd
  1397.  
  1398.  ->    DIAL <string>                    or DIAL <number>
  1399.  
  1400.          The DIAL statement invokes the dialing directory to dial the
  1401.          entry number specified in <string>.  <String> is formatted
  1402.          exactly as with the Alt-D menu; it consists of an entry number
  1403.          1-100 prefixed or suffixed by an optional long-distance entry
  1404.          flag.  Examples:
  1405.  
  1406.  ->         DIAL "1"                ; Dial entry 1
  1407.  ->         DIAL "@1"               ; Dial entry 1 with long-distance
  1408.  
  1409.          When a dialing directory entry indicates a script to be per-
  1410.          formed, the indicated script is ignored when the number is
  1411.          dialed from within a script.  Use the LINKED condition of IF to
  1412.          test this for this condition.  [When a script is invoked from
  1413.          Alt-D, LINKED is true.]
  1414.  
  1415.          Dialing is performed as with the redial command (Alt-R).  The
  1416.          number is dialed every <RDELAY> seconds (below, see SET), until
  1417.          connection is established, or ESC is pressed.  [Note: a script
  1418.          may set a maximum number of redial attempts through SET RDMAX,
  1419.          below.  This feature is ONLY available through a script.]
  1420.  
  1421.          The DIAL command sets the FAILED condition if the command was
  1422.          syntactically incorrect or if an ESC was entered to terminate
  1423.          redialing.  [Note: The script intrinsic "_RDPN" may be used to
  1424.          determine if the DIAL FAILED after redialing the maximum number
  1425.          of times (if set), or aborted by the user.]
  1426.  
  1427.  
  1428.  
  1429. Version 2.6: 900426
  1430.  
  1431. COM-AND: IBM PC Communication Script Language                 Page  22
  1432.  
  1433.  
  1434. V.    Script Language Commands (continued)
  1435.  
  1436.  
  1437.  ->    DIR <string>
  1438.  
  1439.          The DIR statement accepts a string argument as a wildcard
  1440.          template and opens a file display window equivalent to the
  1441.          interactive Alt-F command of COM-AND.  Example:
  1442.  
  1443.  ->         DIR "*.*"               ; Show files on current subdir
  1444.  
  1445.     DIRECTORY Sx (<number>)
  1446.  
  1447.          The DIRECTORY command returns the name field from the dialing
  1448.          directory.  A directory number may be specified, or the last
  1449.          dialed entry may be requested.  Example:
  1450.  
  1451.          DIRECT S0 5             ; Fetch the name from # 5
  1452.          DIRECT S1                 ; Fetch name of last dialed
  1453.  
  1454.  ->    DIV Nx Ny Nz
  1455.  
  1456.          The DIV command performs the instruction:    Nz = Nx/Ny.  No error
  1457.          checking is performed;  should the value exceed the range of a
  1458.          numeric variable, results are unpredictable.  Dividing by zero
  1459.          always yields zero.  Example:
  1460.  
  1461.  ->         DIV N1 N2 N3         ; N3 = N1/N2
  1462.  
  1463.          An expression may be used for Nx or Ny if it is entirely
  1464.          contained within parentheses.
  1465.  
  1466.     DLDIR Sx
  1467.  
  1468.          The DLDIR statement reads the current download drive:sub-
  1469.          directory into the string variable Sx.  Example:
  1470.  
  1471.          DLDIR S0               ; Read the current setting
  1472.  
  1473.     DLOAD <string>
  1474.  
  1475.          The DLOAD statement loads a new dialing directory file (Alt-D).
  1476.          The DLOAD command requires a file name in <string> (up to 27
  1477.          characters).  <String> contains an unqualified file.ext (or may
  1478.          contain a fully pathed file name).  Example:
  1479.  
  1480.          DLOAD "COM-AND.DIR"           ; Load original dialing dir
  1481.          DLOAD "C:\SOURCE\COM-AND.DIR" ; Load special directory
  1482.  
  1483.  
  1484. Version 2.6: 900426
  1485.  
  1486. COM-AND: IBM PC Communication Script Language                 Page  23
  1487.  
  1488.  
  1489. V.    Script Language Commands (continued)
  1490.  
  1491.  
  1492.     DNUMBER Sx (<number>)
  1493.  
  1494.          The DNUMBER command returns the number field from the dialing
  1495.          directory.  A directory number may be specified, or the last
  1496.          dialed entry may be requested.  Example:
  1497.  
  1498.          DNUM S0 5                 ; Fetch the nbr from # 5
  1499.          DNUM S1                 ; Fetch number last dialed
  1500.  
  1501.     DO
  1502.  
  1503.          The DO statement asserts the beginning of a loop.    The end of
  1504.          the loop is signalled by an UNTIL statement (which is evaluated
  1505.          to determine if looping occurs).  Example:
  1506.  
  1507.          DO              ; Loop until condition below
  1508.          ...
  1509.          UNTIL GE N0,10      ; Loop until N0 >= 10
  1510.  
  1511.          The condition evaluated by the UNTIL is any condition accepted
  1512.          by the IF statement (including conjunctions of conditions, dis-
  1513.          junction of conditions, and so on).
  1514.  
  1515.  
  1516.          Note: (1) GOTO statements may never enter a DO loop;  even
  1517.                to leave an inner loop to return to an outer loop.
  1518.  
  1519.          Note: (2) DO statements may be nested (along with IF, SWITCH,
  1520.                WHILE, and FOR loops) up to 20 levels.  However,
  1521.                they may not overlap other DO loops, or other
  1522.                flow-of-control statements.
  1523.  
  1524.          Note: (3) The clause of the DO statement (the statement after
  1525.                'DO' down to the UNTIL statement) is always execu-
  1526.                ted at least once.  The conditional evaluation is
  1527.                not performed until the end of the clause.
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539. Version 2.6: 900426
  1540.  
  1541. COM-AND: IBM PC Communication Script Language                 Page  24
  1542.  
  1543.  
  1544. V.    Script Language Commands (continued)
  1545.  
  1546.  
  1547.  ->    DOS <string> [WAIT]
  1548.  
  1549.          The DOS command executes any DOS command.    It works by loading
  1550.          a copy of COMMAND.COM (or other SHELL program, as specified by
  1551.          the environment variable COMSPEC=) and passing <string> for
  1552.          execution.  Example:
  1553.  
  1554.  ->         DOS "dir a:"            ; List files on the 'A' drive
  1555.  
  1556.          The optional keyword WAIT signals that COM-AND is to pause
  1557.          after completion for a keypress before the script continues.
  1558.  
  1559.          NOTE: The screen is saved prior to the DOS function, for
  1560.          restoration upon completion.  However, the screen size saved
  1561.          is defined by the DWINDOW currently in effect!
  1562.  
  1563.          This command sets the SUCCESS condition (unless the SHELL cannot
  1564.          be found).
  1565.  
  1566.     DPARMS Sx (<number>)
  1567.  
  1568.          The DPARMS command returns the parameters field from the dialing
  1569.          directory, formatted:  rrrr,p,d,s,e (where r=rate, p = parity
  1570.          (EON), d = #data bits (7,8), s=#stop bits (1,2) and e=echo
  1571.          (Y,N," ").  A directory number may be specified, or the last
  1572.          dialed entry may be requested.  Example:
  1573.  
  1574.          DPARMS S0 5             ; Fetch the parms from # 5
  1575.          DPARMS S1                 ; Fetch parms last dialed
  1576.  
  1577.     DSCRIPT Sx (<number>)
  1578.  
  1579.          The DSCRIPT command returns the script file name from the
  1580.          dialing directory (or blanks).  A directory number may be
  1581.          specified, or the last dialed entry may be requested.  Example:
  1582.  
  1583.          DSCRIPT S0 5             ; Fetch the file from # 5
  1584.          DSCRIPT S1              ; Fetch script last dialed
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594. Version 2.6: 900426
  1595.  
  1596. COM-AND: IBM PC Communication Script Language                 Page  25
  1597.  
  1598.  
  1599. V.    Script Language Commands (continued)
  1600.  
  1601.  
  1602.     DWINDOW row col row col
  1603.     DWINDOW CLEAR
  1604.  
  1605.          The DWINDOW command defines a new scrolling region.  The first
  1606.          row/col pair define the new top-left, and the second row/col
  1607.          pair define the bottom-right.  Example:
  1608.  
  1609.          DWINDOW 10,10,20,70         ; Define a small scroll box
  1610.  
  1611.          DWINDOW CLEAR resets the scrolling region to its maximum size
  1612.          (0,0,23,79 CGA, or 0,0,42/49,79 EGA/VGA).
  1613.  
  1614.          'Home' cursor position is relative to the current definition of
  1615.          the scrolling region (e.g.  CLEAR statement).  The region region
  1616.          is returned to 'normal' when a script terminates.  SET 43 and
  1617.          SET 25, if executed after DWINDOW, reset the scrolling region
  1618.          and clear the DWINDOW.
  1619.  
  1620.          Note that COM-AND appropriates the last line of the current
  1621.          display for status/LEGEND display unconditionally.
  1622.  
  1623.          NOTE: The DWINDOW defines the screen size for the DOS, RUN and
  1624.          SHELL functions (for screen saves and restoration).  DWINDOW
  1625.          should generally be turned off prior to these commands, and
  1626.          reset afterwards.
  1627.  
  1628.     EBL Sx <EBL var>
  1629.  
  1630.          The EBL statement references the global data area maintained by
  1631.          EBL (see Appendix F) if EBL is currently installed.  If EBL is
  1632.          not installed, FAILURE is set.  If EBL is installed, the given
  1633.          variable (%A through %O, or &<name>) will be returned in Sx, up
  1634.          to 80 characters long (EBL allows up to 127 characters).
  1635.          Example:
  1636.  
  1637.          EBL S0 %B             ; Fetch The second variable's value
  1638.          IF FAILURE ...         ; Action if EBL not installed
  1639.  
  1640.          Note:  The EBL command tests for the environment variable
  1641.          'BATINT=' before inquiring for EBL's presence.  EBL users use
  1642.          environment variables to declare a new (hex) interrupt number.
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649. Version 2.6: 900426
  1650.  
  1651. COM-AND: IBM PC Communication Script Language                 Page  26
  1652.  
  1653.  
  1654. V.    Script Language Commands (continued)
  1655.  
  1656.  
  1657.     EBLSET &<name> Sx
  1658.  
  1659.          The EBLSET statement permits modification (and creation if space
  1660.          permits) of EBL external variables (see appendix F) if EBL is
  1661.          currently installed.  If EBL is not installed, or if space does
  1662.          not permit the modification, FAILURE is set.  If EBL is
  1663.          installed, the given variable (named '&<name>) will be set to
  1664.          the value in Sx, up to 80 characters long (EBL allows up to 127
  1665.          characters).  Example:
  1666.  
  1667.          EBLSET &USER S0         ; Set ext var to value in S0
  1668.          IF FAILURE ...         ; Action if EBL not installed
  1669.  
  1670.  ->    ELSE
  1671.  
  1672.          The ELSE statement must be contained within the domain of an
  1673.          IF/ENDIF pair.  Statements following an IF statement are
  1674.          executed if the condition specified was found to be true, and
  1675.          execution continues until an ELSE or ENDIF are encountered.  If
  1676.          the condition tested with the IF was found to be false,
  1677.          statements following the ELSE statement (if present) will be
  1678.          executed.    Refer to the IF statement for an example.
  1679.  
  1680.          Note that ELSE may contain the statement to be executed on its
  1681.          own line, in which case no ENDIF is required.
  1682.  
  1683.  ->    EMULATE (TTY!ANSI!VIDTEX!VT100!VT52)
  1684.  
  1685.          The EMULATE command specifies terminal emulation.    COM-AND
  1686.          provides the following emulations (refer to COM-AND.DOC for
  1687.          details):    TTY (b/w), ANSI (color), VIDTEX (for CIS), VT-100
  1688.          and VT-52.  Example:
  1689.  
  1690.  ->         EMULATE TTY         ; Set screen to B&W
  1691.  
  1692.          Note that "EMULATE VIDTEX" is equivalent to "SET ENQ CISB".
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704. Version 2.6: 900426
  1705.  
  1706. COM-AND: IBM PC Communication Script Language                 Page  27
  1707.  
  1708.  
  1709. V.    Script Language Commands (continued)
  1710.  
  1711.  
  1712.     ENCRYPT <string> <string> <string> [DES!SIMPLE!AUTO]
  1713.  
  1714.          The ENCRYPT command encrypts a file (named in the first arg-
  1715.          ument) to a new file (named in the second argument, which will
  1716.          be purged if it exists) using a 32 character password (the third
  1717.          argument).  An optional keyword specifies the method (DES is
  1718.          default).    SUCCESS/FAILURE is set by ENCRYPT.  Do not encrypt in
  1719.          place!  Example:
  1720.  
  1721.          ENCRYPT "COM-AND.EXE" "SECRET.ENF" "abcdefghijklmnop"
  1722.  
  1723.          Note that scripts are automatically decrypted when encountered
  1724.          by COM-AND.  You do not need to decrypt a script in order to
  1725.          EXECUTE it (but you may if you wish...).
  1726.  
  1727.  ->    ENDCASE
  1728.     ENDFOR
  1729.  ->    ENDIF
  1730.  ->    ENDSWITCH
  1731.     ENDWHILE
  1732.  
  1733.          The 'END' statements terminate the domain of 'CASE' (and
  1734.          'DEFAULT'), 'FOR', 'IF', 'SWITCH' and 'WHILE' statements,
  1735.          respectively.  [Note, "DO" is terminated by "UNTIL".] Each of
  1736.          these domain statements MUST be paired with its terminating
  1737.          statement.
  1738.  
  1739.     ENVIRON Sx <string>
  1740.  
  1741.          The ENVIRON statement returns the value associated with the
  1742.          variable <string> in the current environment block.  Envi-
  1743.          ronment variables are established with the DOS SET command,
  1744.          before COM-AND is entered (SET commands executed through the DOS
  1745.          SHELL have no effect on COM-AND).    Example:
  1746.  
  1747.          ENVIRON S5 "COMSPEC="   ; Get current shell pgm name
  1748.  
  1749.          ENVIRON sets and reset the FOUND flag according to operation.
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759. Version 2.6: 900426
  1760.  
  1761. COM-AND: IBM PC Communication Script Language                 Page  28
  1762.  
  1763.  
  1764. V.    Script Language Commands (continued)
  1765.  
  1766.  
  1767.  ->    EXECUTE <string>
  1768.  
  1769.          The EXECUTE command chains to a new script file.  The current
  1770.          script file is closed (and not re-entered when the new file
  1771.          completes).  Any IF/GOSUB/SWITCH/DO/WHILE commands in effect are
  1772.          cleared.  Example:
  1773.  
  1774.  ->         EXECUTE "newfile.cmd"   ; Pick up with a new script
  1775.          ; Nothing past this point in the script will be performed.
  1776.  
  1777.          Note that string variables and conditions are retained as they
  1778.          are when the new script file begins execution.  In this way,
  1779.          parameters may be passed to a new script.
  1780.  
  1781.  ->    EXIT
  1782.  
  1783.          The EXIT command terminates the script execution.    It may be
  1784.          coded at any level (for example within a subroutine reached
  1785.          through a call from a subroutine).  Example:
  1786.  
  1787.  ->         EXIT             ; Terminate the script processor
  1788.          ; Nothing past this point in the script will be performed.
  1789.  
  1790.          NOTE: When the script processor reaches end-of-file, an implicit
  1791.          EXIT is performed.  This is true in EXECUTed as well as FCALLed
  1792.          scripts.
  1793.  
  1794.  ->    FATSAY row col attr <string> <parms>
  1795.  
  1796.          The FATSAY statement performs the MESSAGE function, i.e.
  1797.          writing to the screen, with cursor positioning and color
  1798.          control.  Parameters are formatted into the string provided from
  1799.          the list provided.  Example:
  1800.  
  1801.  ->         FATSAY 0 0 15 "The answer is %d %s" N0 S0 ; Value and label
  1802.          FATSAY 0 0 (black white) "The answer is %d %s" N0 S0
  1803.  
  1804.          Note that the cursor is left positioned after the last character
  1805.          written.  Refer to the STRFMT statement for discussion of
  1806.          parameter formatting.
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814. Version 2.6: 900426
  1815.  
  1816. COM-AND: IBM PC Communication Script Language                 Page  29
  1817.  
  1818.  
  1819. V.    Script Language Commands (continued)
  1820.  
  1821.  
  1822.     FATTR Sx <file>
  1823.  
  1824.          The FATTR command formats the file attribute byte as binary
  1825.          digits into the target string (Sx).  The file name specifi-
  1826.          cation may be a literal quoted string, or a string variable.
  1827.          The formatted string is 8 characters, either 0 or 1.  Example:
  1828.  
  1829.          FATTR S3 "COM-AND.EXE"          ; Format into S3
  1830.  
  1831.          The FATTR command sets and resets the SUCCESS flag according to
  1832.          the presence of the named file.  The bits returned have meaning:
  1833.  
  1834.          xxxxxxxx
  1835.             ^------------------------  Read-only file
  1836.            ^-------------------------  Hidden file
  1837.           ^--------------------------  System file
  1838.          ^---------------------------  File is a volume ID
  1839.         ^----------------------------  File is a subdirectory
  1840.            ^-----------------------------  Archive bit for the file
  1841.           ^------------------------------  Always 0
  1842.          ^-------------------------------  Always 0
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869. Version 2.6: 900426
  1870.  
  1871. COM-AND: IBM PC Communication Script Language                 Page  30
  1872.  
  1873.  
  1874. V.    Script Language Commands (continued)
  1875.  
  1876.  
  1877.     FCALL <file>
  1878.  
  1879.          The FCALL command invokes the file given as if it were a
  1880.          subroutine.  If the new file is encrypted, a password will be
  1881.          requested (if the calling file is encrypted, the password to
  1882.          the old file is not requested upon return).  Example:
  1883.  
  1884.          FCALL "SUBS.CMD"                ; Call a file
  1885.  
  1886.          The called file returns to the caller upon an FRETURN instruc-
  1887.          tion.  If end-of-file or EXIT is encountered in the called
  1888.          file, the script terminates.  [Note that "IF FCALLed" permits
  1889.          determination that the current file was entered via FCALL.]
  1890.  
  1891.          FCALL does not allow a branch out of the called file back into
  1892.          the caller's file.  Labels in an FCALLed file MAY duplicate
  1893.          labels in the caller's file.  Note that ON ESCAPE is not reset
  1894.          on entry via FCALL, and unless the new script has the identical
  1895.          label, the script fails (label not found) on escape.
  1896.  
  1897.          For performance purposes, FCALL does NOT close the calling file
  1898.          when the new script file is opened.  All script files are closed
  1899.          upon exit... however, a recursion amongst scripts may quickly
  1900.          consume all DOS file handles.  Avoid pairs of scripts where each
  1901.          script FCALLs the other.
  1902.  
  1903.          FCALLs may be nested to a depth of up to 10.
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924. Version 2.6: 900426
  1925.  
  1926. COM-AND: IBM PC Communication Script Language                 Page  31
  1927.  
  1928.  
  1929. V.    Script Language Commands (continued)
  1930.  
  1931.  
  1932.  ->    FCLOSEI
  1933.  ->    FCLOSEO
  1934.  
  1935.          The FCLOSEI and FCLOSEO commands close a file opened for input
  1936.          or output.  FCLOSE<I!O> on a file not opened does not hurt
  1937.          anything.    When a file is closed, all blocks pending are flushed
  1938.          to the file.  Example:
  1939.  
  1940.  ->         FCLOSEI             ; We're done with it
  1941.  
  1942.          Please note that, when opened for output in TEXT mode, COM-AND
  1943.          does not add a final ^Z (ASCII EOF convention).  The script
  1944.          author may choose to precede FCLOSEO with a 'WRITE ^Z"' as need
  1945.          dictates.
  1946.  
  1947.     FDATE Sx <file> [0!1]
  1948.  
  1949.          The FDATE command places the date last modified (as known by
  1950.          DOS) into the target string (Sx).    The file name specification
  1951.          may be a literal quoted string, or a string variable.  The date
  1952.          is formatted according to the optional format argument (if
  1953.          provided and nonzero, the date is formatted mm/dd/yyyy;
  1954.          otherwise it is formatted mm/dd/yy).  Example:
  1955.  
  1956.          FDATE S3 "COM-AND.EXE" 1        ; Format date into S3
  1957.  
  1958.          The FDATE command sets and resets the SUCCESS flag.
  1959.  
  1960.     FFIRST Sx
  1961.  
  1962.          The FFIRST command initializes a wildcard lookup.    If SUCCESS is
  1963.          set after FFIRST, file names may be obtained using the FNEXT
  1964.          command.  Only one thread of file name lookups is performed at
  1965.          anyone time;  invoking FFIRST when there are more file names to
  1966.          be returned terminates the previous thread.  Example:
  1967.  
  1968.          FFIRST "*.asm"                  ; Initialize lookup
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979. Version 2.6: 900426
  1980.  
  1981. COM-AND: IBM PC Communication Script Language                 Page  32
  1982.  
  1983.  
  1984. V.    Script Language Commands (continued)
  1985.  
  1986.  
  1987.  ->    FGETC Sx
  1988.  ->    FGETS Sx
  1989.  
  1990.          The FGETC and FGETS commands read a character (FGETC) or a
  1991.          string (FGETS) into a string variable.  The input file must be
  1992.          opened by a previous FOPENI, of course.
  1993.  
  1994.          In TEXT mode, the FGET commands translate CR/LF pairs in the
  1995.          input file to single LFs.    No tab expansion is performed.    In
  1996.          TEXT mode, the FGET commands stop on an ASCII EOF (Ctl-Z).
  1997.  
  1998.          FGETC reads a single character into Sx(0:0).  FGETS reads up to
  1999.          80 characters into Sx.  If the input file was opened in TEXT
  2000.          mode, the read string terminates at the 80th byte or a CR/LF
  2001.          pair (placed in Sx as a single LF).  Example:
  2002.  
  2003.  ->         FGETS S0             ; Read up to 80 bytes
  2004.  
  2005.          The FGET commands set the EOF condition on input EOF.  This may
  2006.          be tested with the IF statement.
  2007.  
  2008.          Note also: FREAD and READ commands.
  2009.  
  2010.  ->    FIND Sx <string> [Nx]
  2011.  
  2012.          The FIND command tests for a substring within a target string.
  2013.          Case is not significant.  This command sets the FOUND condition
  2014.          for the IF command.  Example:
  2015.  
  2016.  ->         FIND S0 "sentence"      ; Test for the word 'sentence'
  2017.  
  2018.          Note the optional numeric variable argument.  If supplied, the
  2019.          index (0,1,2,3...) to the substring within the target string is
  2020.          placed in the indicated numeric variable.
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034. Version 2.6: 900426
  2035.  
  2036. COM-AND: IBM PC Communication Script Language                 Page  33
  2037.  
  2038.  
  2039. V.    Script Language Commands (continued)
  2040.  
  2041.  
  2042.     FNEXT  Sx [QUAL]
  2043.  
  2044.          The FNEXT command returns file names from a wildcard lookup.  If
  2045.          SUCCESS is set after FNEXT, the given string variable contains
  2046.          the next file name from the template match begun with FFIRST.
  2047.          IF FAILURE is set, the string variable is also set to nulls.
  2048.          Example:
  2049.  
  2050.          FNEXT S0                 ; Return name.ext
  2051.          FNEXT S0 QUAL             ; Return fully qualified name
  2052.  
  2053.          Wildcard lookup must be initialized with the FFIRST command.
  2054.          The optional 'QUAL' modifier controls whether the returned name
  2055.          is "name.ext" or fully qualified with drive:subdirectory.
  2056.  
  2057.  ->    FOPENI <file> [TEXT!BINARY]
  2058.  ->    FOPENO <file> [TEXT!BINARY!APPEND]
  2059.  
  2060.          The FOPENI and FOPENO commands open a file for input or output.
  2061.          COM-AND currently supports one file opened for input and one for
  2062.          output at any one time.  I/O to/from the file is blocked for
  2063.          fastest access.
  2064.  
  2065.          Files opened for input may be declared TEXT or BINARY in the
  2066.          open statement.  The default is TEXT.  When the file is opened,
  2067.          it is positioned to the start of the file.
  2068.  
  2069.          Files opened for output may be declared TEXT or BINARY in the
  2070.          open statement.  The default is TEXT.  On output, unless APPEND
  2071.          is specified, the file is purged if it existed previously.  On
  2072.          output, if APPEND is specified, the file is created if it does
  2073.          not exist, and positioned to end-of-file.
  2074.  
  2075.  ->         FOPENI "COM-AND.UFL" TEXT       ; Open file in text mode
  2076.          FOPENO "COM-AND.LOG" TEXT APPEND; Open file, add to old data
  2077.  
  2078.          The FOPEN commands set the SUCCESS flag according to completion.
  2079.  
  2080.          Refer to FCLOSE, FGET, FPUT, FREAD, FWRITE, READ and WRITE for
  2081.          details of input/output file handling.  Also refer to REWIND,
  2082.          FSAVE and FRESTORE for positioning controls.
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089. Version 2.6: 900426
  2090.  
  2091. COM-AND: IBM PC Communication Script Language                 Page  34
  2092.  
  2093.  
  2094. V.    Script Language Commands (continued)
  2095.  
  2096.  
  2097.     FOR Nx = <init> <final> [<step>]
  2098.  
  2099.          The FOR statement asserts the beginning of a loop, controlled by
  2100.          the value of a specific numeric index.  The initial value, the
  2101.          final value, and an optional step value are specified.  [If a
  2102.          step value is not specified, a step of 1 is used.]
  2103.  
  2104.          The FOR statement initializes the index variable to the given
  2105.          value and performs commands until an ENDFOR is encountered.
  2106.          Upon ENDFOR, the index is incremented (or decremented) by the
  2107.          step value and the result tested against the given final value.
  2108.  
  2109.          If the step is positive, the loop terminates when the index is
  2110.          greater than the final value.  If the step is negative, the loop
  2111.          terminates when the index is less than the final value.
  2112.  
  2113.          Example:
  2114.  
  2115.          FOR N0 = 1,10         ; Loop for 10 times
  2116.          ...
  2117.          ENDFOR
  2118.  
  2119.  
  2120.          Note: (1) The STEP and FINAL values are evaluated when the
  2121.                FOR statement is encountered.  Changing intermediate
  2122.                values has no effect on the loop.
  2123.  
  2124.          Note: (2) The loop index specified should not be modified
  2125.                within the loop.  The results are unspecified if so.
  2126.  
  2127.          Note: (3) GOTO statements may never enter a FOR loop;  even
  2128.                to leave an inner loop to return to an outer loop.
  2129.  
  2130.          Note: (4) FOR statements may be nested (along with IF, SWITCH,
  2131.                WHILE and DO loops) up to 20 levels.  However, they
  2132.                may not overlap other FOR loops, or other flow-of-
  2133.                control statements.
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144. Version 2.6: 900426
  2145.  
  2146. COM-AND: IBM PC Communication Script Language                 Page  35
  2147.  
  2148.  
  2149. V.    Script Language Commands (continued)
  2150.  
  2151.  
  2152.  ->    FPUTC Sx
  2153.  ->    FPUTS Sx
  2154.  
  2155.          The FPUTC and FPUTS commands write a character (FPUTC) or a
  2156.          string (FPUTS) from a string variable to the output file.    The
  2157.          output file must be opened by a previous FOPENO.
  2158.  
  2159.          In TEXT mode the FPUT commands translate LFs in the string
  2160.          buffer to CR/LF pairs.  No tab compression is performed.
  2161.  
  2162.          FPUTC writes a single character from Sx.
  2163.  
  2164.          FPUTS writes up to 80 characters from Sx, according to the
  2165.          length of the value in Sx.  Example:
  2166.  
  2167.  ->         FPUTS S0             ; Write up to 80 bytes
  2168.  
  2169.          Note also: FWRITE and WRITE commands.
  2170.  
  2171.  ->    FREAD Sx Nx Ny
  2172.  
  2173.          The FREAD command reads a string (up to Nx characters) into a
  2174.          string variable.  The input file must be opened by a previous
  2175.          FOPENI, of course.
  2176.  
  2177.          In TEXT mode, the FREAD command translates CR/LF pairs in the
  2178.          input file to single LFs, and the read operation ends.  No tab
  2179.          expansion is performed.  If the input file was opened in TEXT
  2180.          mode, the FREAD commands stop on an ASCII EOF character (Ctl-Z).
  2181.  
  2182.          FREAD reads up to 80 characters into Sx.  If the input file was
  2183.          opened in TEXT mode, the read string terminates at the 80th byte
  2184.          or at a CR/LF pair (placed in Sx as a single LF).    The count
  2185.          read is placed in Ny.
  2186.  
  2187.          Example:
  2188.  
  2189.  ->         FREAD S0 80 N4         ; Read 80 bytes; count read in N4
  2190.  
  2191.          The FREAD command sets the EOF condition on input EOF.  This may
  2192.          be tested with the IF statement.
  2193.  
  2194.          Note also: FGETC/FGETS/READ, and especially notes in READ.
  2195.  
  2196.  
  2197.  
  2198.  
  2199. Version 2.6: 900426
  2200.  
  2201. COM-AND: IBM PC Communication Script Language                 Page  36
  2202.  
  2203.  
  2204. V.    Script Language Commands (continued)
  2205.  
  2206.  
  2207.     FREE Sx <string>
  2208.  
  2209.          The FREE statement returns the free space (as a numeric string)
  2210.          on a given disc.  The second operand specifies the drive ("" may
  2211.          be used for the default drive) as "d:", where d = a,b,c...
  2212.          Example:
  2213.  
  2214.          FREE S0 "C:"                   ; Get free space on C:
  2215.  
  2216.     FRESTOREI
  2217.     FRESTOREO
  2218.  
  2219.          The FRESTORE statement restores the last saved position in
  2220.          either the input or output file.  The FRESTORE statement sets
  2221.          the SUCCESS flag according to save-stack underflow.  See FSAVE
  2222.          below for more detail.  Example:
  2223.  
  2224.          FRESTOREI                ; Restore last saved position
  2225.  
  2226.     FRETURN
  2227.  
  2228.          The FRETURN command returns returns from an FCALL instruction.
  2229.          The current file is closed, and the previous file (the one
  2230.          containing the FCALL) continues.  If the file that invoked FCALL
  2231.          is encrypted, the previous password is NOT requested a second
  2232.          time.  Example:
  2233.  
  2234.          FRETURN                 ; Return to calling file
  2235.  
  2236.          The FCALL stack is limited to a depth of 10 FCALLs.
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254. Version 2.6: 900426
  2255.  
  2256. COM-AND: IBM PC Communication Script Language                 Page  37
  2257.  
  2258.  
  2259. V.    Script Language Commands (continued)
  2260.  
  2261.  
  2262.     FSAVEI [CLEAR!SHIFT!POP]
  2263.     FSAVEO [CLEAR!SHIFT!POP]
  2264.  
  2265.          The FSAVE statement saves the current file position (input or
  2266.          output) on a stack for later repositioning (FRESTORE).  Up to 20
  2267.          positions may be saved for each file.  The SUCCESS flag is
  2268.          set/reset according to save-stack overflow.  Example:
  2269.  
  2270.          FSAVEI                 ; To come back later
  2271.  
  2272.          Three subcommands are also provided:
  2273.  
  2274.          FSAVE[I!O] CLEAR             ; Zeroes the save-stack
  2275.          FSAVE[I!O] SHIFT             ; Shifts the stack down one
  2276.          FSAVE[I!O] POP             ; Throws away last saved pos
  2277.  
  2278.          The appropriate file must be open before FSAVE is used.  The
  2279.          FCLOSEx (and FOPENx) instruction clears its save-stack.
  2280.  
  2281.     FSIZE Sx <file>
  2282.  
  2283.          The FSIZE command sets the file size (up to seven digits) into
  2284.          the target string (Sx).  The file name specification may be a
  2285.          literal quoted string, or a string variable.  The SIZE is
  2286.          formatted with leading zeroes blanked and the string right
  2287.          justified in a space of 7 characters.  Example:
  2288.  
  2289.          FSIZE S3 "COM-AND.EXE"          ; Format into S3
  2290.  
  2291.          The FSIZE command sets and resets the SUCCESS flag according to
  2292.          the presence of the named file.
  2293.  
  2294.     FTIME Sx <file> [0!1]
  2295.  
  2296.          The FTIME command sets the time last modified (as known by DOS)
  2297.          into the target string (Sx).  The file name specification may
  2298.          be a literal quoted string, or a string variable.    The TIME is
  2299.          formatted according to the optional format argument (if provided
  2300.          and nonzero, the time is formatted hh:mm:ss where hh is 0-23;
  2301.          otherwise it is formatted hh:mm:ss with a final AM or PM).
  2302.          Example:
  2303.  
  2304.          FTIME S3 "COM-AND.EXE" 1        ; Format military time into S3
  2305.  
  2306.          The FTIME command sets and resets the SUCCESS flag.
  2307.  
  2308.  
  2309. Version 2.6: 900426
  2310.  
  2311. COM-AND: IBM PC Communication Script Language                 Page  38
  2312.  
  2313.  
  2314. V.    Script Language Commands (continued)
  2315.  
  2316.  
  2317.  ->    FWRITE Sx Nx
  2318.  
  2319.          The FWRITE command writes a string from a string variable to the
  2320.          output file.  The length of the string variable is specified by
  2321.          Nx.  The output file must be opened by a previous FOPENO.
  2322.  
  2323.          In TEXT mode the FWRITE command translates LFs in the string
  2324.          buffer to CR/LF pairs.  No tab compression is performed.
  2325.  
  2326.          FWRITE writes up to 80 characters from Sx, according to the
  2327.          value in Nx.
  2328.  
  2329.          Example:
  2330.  
  2331.  ->         FPUTS S0 75         ; Write 75 bytes
  2332.  
  2333.          Note also: FPUTC/FPUTS/WRITE and especially the WRITE command.
  2334.  
  2335.  ->    GET Sx [<number>]
  2336.  
  2337.          The GET command reads the keyboard for text.  Text entry is
  2338.          terminated by a carriage return, or, if the optional numeric
  2339.          argument was supplied, after <number> characters.    Keyentry is
  2340.          echoed back to the screen.  Escape entered in response to the
  2341.          GET command terminates the script.  Example:
  2342.  
  2343.  ->         MESSAGE "^MEnter a password:"
  2344.  ->         GET S0 8             ; Get up to 8 characters
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364. Version 2.6: 900426
  2365.  
  2366. COM-AND: IBM PC Communication Script Language                 Page  39
  2367.  
  2368.  
  2369. V.    Script Language Commands (continued)
  2370.  
  2371.  
  2372.  ->    GETFILE ASCII    <string>     ; A.K.A. Buffer capture
  2373.  ->    GETFILE BYMODEM          ; Batch YMODEM
  2374.  ->    GETFILE BYMODEMG         ; Batch YMODEM-G (BYMOG works too)
  2375.  ->    GETFILE CISB             ; CompuServe B-protocol
  2376.  ->    GETFILE KERMIT             ; Kermit or SuperKermit
  2377.     GETFILE QUICKB             ; CompuServe Quick B-protocol
  2378.  ->    GETFILE RXMODEM <string>     ; Relaxed CRC or Checksum XMODEM
  2379.  ->    GETFILE WXMODEM <string>     ; Windowed XMODEM
  2380.  ->    GETFILE XMODEM    <string>     ; CRC or Checksum XMODEM
  2381.  ->    GETFILE YMODEM    <string>     ; Simple YMODEM (not True ... (TM))
  2382.     GETFILE ZMODEM             ; ZMODEM transfer (batch)
  2383.  
  2384.          The GETFILE statement initiates a download using one of the
  2385.          specified protocols.  The <string> argument must specify a valid
  2386.          file name.  [If the specified file name exists with one of the
  2387.          XMODEMs, a manual "Purge?" query will pop-up.] The GETFILE
  2388.          command sets SUCCESS/FAILURE condition according to the
  2389.          transfer.    Example:
  2390.  
  2391.  ->         GETFILE XMODEM "com-and.arc"  ; Download
  2392.  
  2393.          Note that, in the cases of CISB, KERMIT,Batch YMODEM (G), and
  2394.          ZMODEM, the host tells COM-AND the name the file will take on
  2395.          your machine.  If the name duplicates an existing name, char-
  2396.          acters of the extent are replaced by '$' (right to left).  [If
  2397.          ZMODEM recovery is enabled, a ZMODEM transfer picks up where a
  2398.          failed transfer stopped, using the same file name.]
  2399.  
  2400.  
  2401.          Notes:
  2402.  
  2403.          (1) With ASCII transfers, you must manually terminate the
  2404.          capture with ESC.
  2405.  
  2406.          (2) XMODEM and YMODEM (XMODEM1K) automatically purge the target
  2407.          file if found.  No manual intervention is required.
  2408.  
  2409.          (3) ZMODEM and CIS-B ( and QuickB) provide an automated download
  2410.          function.  The automated function is NOT available within a
  2411.          script unless the script is 'reading the port', i.e. with an
  2412.          RGET, PAUSE or SUSPEND statement.
  2413.  
  2414.          (4) ZMODEM recovery (of a failed transfer) may be enabled and
  2415.          disabled with the SET ZMODEM RECOVER statement.
  2416.  
  2417.  
  2418.  
  2419. Version 2.6: 900426
  2420.  
  2421. COM-AND: IBM PC Communication Script Language                 Page  40
  2422.  
  2423.  
  2424. V.    Script Language Commands (continued)
  2425.  
  2426.  
  2427.  ->    GOSUB <label>
  2428.  
  2429.          The GOSUB statement transfers control to the label specified in
  2430.          <string>.    When a RETURN statement is encountered, execution
  2431.          resumes at the next statement (after the GOSUB).  GOSUB commands
  2432.          may be nested to a maximum stack depth of 20.  Example:
  2433.  
  2434.          IF FOUND             ; Test result of a FIND
  2435.  ->        GOSUB "SUB"          ; If we found it, transfer to sub
  2436.  ->        ENDIF             ; .. and return here
  2437.          ...
  2438.  ->         EXIT             ; End of main-line script
  2439.          ...
  2440.  ->         SUB:
  2441.  ->         MESSAGE "..."           ; Issue a message
  2442.  ->         RETURN             ; And return to after the GOSUB
  2443.  
  2444.          All of the following are legitimate GOSUB's:
  2445.  
  2446.  ->         GOSUB LABEL         ; Direct LABEL name
  2447.  ->         GOSUB "LABEL"           ; Quoted LABEL name
  2448.  
  2449.          ASSIGN S0 "LABEL"       ; Assign label name to a string
  2450.          GOSUB S0             ; And goto the label in S0
  2451.  
  2452.          Note that you cannot GOSUB to a label in a file that has FCALLed
  2453.          the current file.    This includes ON ESCAPE GOSUB and ON SILENCE
  2454.          GOSUB conditions (see below).  The FCALLed file may however have
  2455.          a label that duplicates one in the caller's file.  In the latter
  2456.          case, the GOSUB transfers to the label in the FCALLed file.
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474. Version 2.6: 900426
  2475.  
  2476. COM-AND: IBM PC Communication Script Language                 Page  41
  2477.  
  2478.  
  2479. V.    Script Language Commands (continued)
  2480.  
  2481.  
  2482.  ->    GOTO <label>
  2483.  
  2484.          The GOTO statement unconditionally transfers control to the
  2485.          label specified in <string>.  If there is more than one <label>
  2486.          in the script file that matches <string> control is transferred
  2487.          to the one nearest the beginning of the script.  Example:
  2488.  
  2489.  ->         IF FAILURE          ; Test previous command execution
  2490.  ->        GOTO "ERROR"         ; Branch if it didn't work
  2491.  ->        ENDIF             ; End error test
  2492.          ...
  2493.  ->         ERROR:
  2494.  ->         EXIT             ; Terminate the script
  2495.  
  2496.          Note:  GOTO's may be used to transfer control out of an IF,
  2497.          CASE, DO, or WHILE clause.  However:  GOTO's should never be
  2498.          used to transfer control INTO one or the other clauses of an IF,
  2499.          CASE, DO or WHILE structure.  This warning includes transfer out
  2500.          of an IF clause into an enveloping IF clause.  "Unexpected
  2501.          ENDIF" or "Unexpected ENDCASE" error messages result from such
  2502.          practice.    For example:
  2503.  
  2504.          IF condition         ; Example of a nested IF
  2505.         ...
  2506.         IF condition
  2507.            GOTO SKIP_It      ; This is INVALID!!!  It branches
  2508.            ENDIF         ; .. into an IF clause out of one
  2509.         ...
  2510.          SKIP_It:             ; This label is within the outer IF
  2511.         ...             ;          !!! INVALID !!!
  2512.         ENDIF             ; End of outer IF
  2513.  
  2514.          Like the GOSUB statement, the operand of a GOTO statement may be
  2515.          a literal label, a quoted label, or a string variable containing
  2516.          the label as text.
  2517.  
  2518.          Note:  GOTO's may not be used to transfer control out of a
  2519.          subroutine.  "Stack overflows" will eventually be reported if
  2520.          this happens.
  2521.  
  2522.          Note:  GOTO's will not exit an FCALLed file to reach a label in
  2523.          a previous file (the caller or caller of caller).    The domain of
  2524.          labels used by GOTO is the current script file, and does not
  2525.          include calling files.
  2526.  
  2527.  
  2528.  
  2529. Version 2.6: 900426
  2530.  
  2531. COM-AND: IBM PC Communication Script Language                 Page  42
  2532.  
  2533.  
  2534. V.    Script Language Commands (continued)
  2535.  
  2536.  
  2537.  ->    HANGUP
  2538.  
  2539.          The HANGUP command terminates the modem connection (if connec-
  2540.          tion has been established).  It changes CONNECTED condition
  2541.          (tested with the IF statement, if true CD is enabled on the
  2542.          modem).  Example:
  2543.  
  2544.  ->         HANGUP             ; Disconnect:  we're done
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584. Version 2.6: 900426
  2585.  
  2586. COM-AND: IBM PC Communication Script Language                 Page  43
  2587.  
  2588.  
  2589. V.    Script Language Commands (continued)
  2590.  
  2591.  
  2592.  ->    IF [NOT] <condition> [<statement>]
  2593.  
  2594.          The IF statement tests a stated condition, and transfers control
  2595.          according to the result of the test.  The IF statement may carry
  2596.          the statement to be performed conditionally, or it may precede
  2597.          statements to be executed if the evaluation is true.
  2598.  
  2599.          In the latter case, and ONLY in that case (where the statements
  2600.          to be conditionally executed follow the IF statement), the
  2601.          script may include an optional ELSE clause, to be executed if
  2602.          the condition evaluated is found false.  The domain of this form
  2603.          of IF control is terminated with an ENDIF statement.
  2604.  
  2605.          This constuction of the IF statements may be nested up to a
  2606.          maximum stack depth of 20 (with SWITCH DO, FOR, WHILE, and
  2607.          GOSUBs).  Example:
  2608.  
  2609.  ->         IF <condition>         ; Test condition
  2610.  ->        GOSUB "TRUE"         ; .. execute this if true
  2611.  ->         ELSE             ; Optional ELSE clause
  2612.  ->        GOSUB "FALSE"        ; .. execute this if condition false
  2613.  ->         ENDIF             ; End of IF
  2614.  
  2615.          An equally legitimate construction could be:
  2616.  
  2617.          IF <condition> GOSUB "TRUE"
  2618.          IF NOT <condition> GOSUB "FALSE"
  2619.  
  2620.          Or even:
  2621.  
  2622.  ->         IF <condition>         ; Test condition
  2623.  ->        GOSUB "TRUE"         ; .. execute this if true
  2624.          ELSE GOSUB "False"      ; ENDIF-less form
  2625.  
  2626.          Please note however, that the following construction is invalid.
  2627.  
  2628.          IF GOSUB "TRUE"         ; This statement allows NO ELSE or ENDIF
  2629.          ELSE GOSUB "False"      ; Therefore, this statement fails
  2630.  
  2631.  ->         IF conditions may be joined with AND, OR, and XOR within one
  2632.  ->         IF statement.  Parentheticization is also supported.  This
  2633.  ->         extension will be discussed below, after the conditions are
  2634.  ->         listed.
  2635.  
  2636.  
  2637.  
  2638.  
  2639. Version 2.6: 900426
  2640.  
  2641. COM-AND: IBM PC Communication Script Language                 Page  44
  2642.  
  2643.  
  2644. V.    Script Language Commands (continued)
  2645.  
  2646.  
  2647.  ->    IF <condition> (continued)
  2648.  
  2649.          The optional keyword NOT may precede the condition being tested
  2650.          to reverse its meaning.  IF conditions are:
  2651.  
  2652.          ALLOCATED         The ALLOCATED condition is true if dynamic var-
  2653.                  iables are currently allocated.
  2654.  
  2655.          ALPHA Sx         The ALPHA condition tests the first character
  2656.                  of the given string.  It is true if it finds
  2657.                  A-z or a-z.
  2658.  
  2659.  ->         CONNECTED         The CONNECTED condition is set and reset
  2660.                  according to the CD (carrier detect) of the
  2661.                  modem.  If your modem does not report true
  2662.                  CD, then this condition will not be reliable.
  2663.  
  2664.          CONTROL Sx      The CONTROL condition tests the first char-
  2665.                  acter of the given string.  It is true when
  2666.                  the character has a value less than 32 (' ').
  2667.  
  2668.          ERROR         The ERROR condition is set and reset by the
  2669.                  script processor after each command.  If the
  2670.                  command was syntactically or semantically
  2671.                  invalid, this condition is set.
  2672.  
  2673.  ->         EOF         The EOF condition is set and reset by the
  2674.                  last FGETS/FGETC/FREAD/READ statements.
  2675.  
  2676.  ->         HITKEY         The HITKEY condition is true if a keypress
  2677.                  is pending (it will not be read).    Note: Use
  2678.                  of this function suspends normal type-through
  2679.                  until a GET/MGET/ATGET/MATGET/KEYGET/KFLUSH
  2680.                  is performed, regardless of value returned.
  2681.  
  2682.                  Use of HITKEY may inhibit ESC termination!
  2683.  
  2684.  ->         FAILED         The FAILED condition is simply "NOT SUCCESS".
  2685.  
  2686.          FCALLED         The FCALLED condition tests if the current
  2687.                  script file was entered via an FCALL state-
  2688.                  ment (if is false unless an FRET is needed).
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694. Version 2.6: 900426
  2695.  
  2696. COM-AND: IBM PC Communication Script Language                 Page  45
  2697.  
  2698.  
  2699. V.    Script Language Commands (continued)
  2700.  
  2701.  
  2702.  ->    IF <condition> (continued)
  2703.  
  2704.          FIND Sx Sy [Nx] The FIND condition is actually a FIND per-
  2705.                  formed within the IF statement.  The syntax
  2706.                  and function are identical to the instruction.
  2707.  
  2708.          FKEY         The FKEY condition works in a fashion similar to
  2709.                  HITKEY.  FKEY waits for a function key (not an
  2710.                  ASCII key) to be pressed.    ASCII keystrokes are
  2711.                  typed-through (if TTHRU is on).
  2712.  
  2713.          FLAG [(#)]      The FLAG condition tests the current state
  2714.                  of flag number # (0-9).  Flags are set and
  2715.                  with the script instruction SET FLAG.
  2716.  
  2717.  ->         FOUND         The FOUND condition is set and reset by
  2718.                  the last FIND statement.
  2719.  
  2720.          FULL         The FULL condition works in a fashion similar to
  2721.                  XOFF.  FULL is true when COM-AND has XOFFed the
  2722.                  other side (SOFT flow control must therefore be
  2723.                  ON for this test to be of use).
  2724.  
  2725.          ISDLFILE Sx     The ISDLFILE condition is actually a ISDLFILE
  2726.                  performed within the IF statement.  The syntax
  2727.                  and function are identical to the instruction.
  2728.  
  2729.          ISFILE Sx         The ISFILE condition is actually a ISFILE
  2730.                  performed within the IF statement.  The syntax
  2731.                  and function are identical to the instruction.
  2732.  
  2733.          ISSCFILE Sx     The ISSCFILE condition is actually a ISSCFILE
  2734.                  performed within the IF statement.  The syntax
  2735.                  and function are identical to the instruction.
  2736.  
  2737.  ->         LINKED         The LINKED condition is true when the
  2738.                  script being executed was invoked from a
  2739.                  dialing directory entry.
  2740.  
  2741.  ->         MONO         The MONO condition is true if the CRT is
  2742.                  a monochrome monitor (mode 7).
  2743.  
  2744.          NULL Sx         The NULL condition tests the given string
  2745.                  and is true if the string is blank or null.
  2746.  
  2747.  
  2748.  
  2749. Version 2.6: 900426
  2750.  
  2751. COM-AND: IBM PC Communication Script Language                 Page  46
  2752.  
  2753.  
  2754. V.    Script Language Commands (continued)
  2755.  
  2756.  
  2757.  ->    IF <condition> (continued)
  2758.  
  2759.          NUMERIC Sx      The NUMERIC condition tests the first char-
  2760.                  acter of the given string.  It is true if it
  2761.                  finds one of the characters 0-9.
  2762.  
  2763.          PRINTER         The PRINTER condition tests for the printer
  2764.                  enabled through COM-AND (PRINTER ON!OFF).
  2765.  
  2766.          OVERLAY         The OVERLAY condition tests for the presence of
  2767.                  a machine language overlay file.
  2768.  
  2769.          RECEIVE         The RECEIVE condition tests for characters
  2770.                  pending on the comm port.    It is true if one
  2771.                  or more characters are ready to be read.
  2772.  
  2773.          SPECIAL Sx      The SPECIAL condition tests the first char-
  2774.                  acter of the given string.  It is true if the
  2775.                  character is not alpha, numeric or control.
  2776.  
  2777.          STRCMP Sx Sy    The STRCMP condition is actually a STRCMP
  2778.                  performed within the IF statement.  The syntax
  2779.                  and function are identical to the instruction.
  2780.  
  2781.  ->         SUCCESS         The SUCCESS condition is set and reset
  2782.                  according to the result of the last GETFILE,
  2783.                  SENDFILE, ISFILE, RGET, DOS, RUN, LOG OPEN,
  2784.                  FFIRST, FNEXT, FDATE, FTIME, FSIZE, FATTR,
  2785.                  RENAME, REWIND, DELETE and DIAL statements.
  2786.  
  2787.          TRACE         The TRACE condition tests the TRACE ON!OFF
  2788.                  status.
  2789.  
  2790.  ->         WAITFOR         The WAITFOR condition is set and reset
  2791.                  by the last WAITFOR statement.
  2792.  
  2793.          XOFF         The XOFF condition tests to determine if an XOFF
  2794.                  received from the host is currently pending.
  2795.                  SOFT flow control must be ON for this test.
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804. Version 2.6: 900426
  2805.  
  2806. COM-AND: IBM PC Communication Script Language                 Page  47
  2807.  
  2808.  
  2809. V.    Script Language Commands (continued)
  2810.  
  2811.  
  2812.  ->    IF <condition> (continued)
  2813.  
  2814.  ->         ZERO Nx         The ZERO condition must be qualified by a
  2815.                  numeric value/variable.  The condition is
  2816.                  true if the evaluation is 0.
  2817.  
  2818.                  Note: Expressions may be used in place of Nx,
  2819.                  if the expression is parentheticized.  For
  2820.                  example: "IF ZERO (N0-10)" is allowed.
  2821.  
  2822.  ->         <cc> Nx Ny      Numeric conditionals are expressed as <cc>
  2823.                  (where <cc> may be EQ, LT, GT, LE, GE, NE)
  2824.                  followed by two numeric values/variables.
  2825.                  IF LT N1 N2 is interpreted: IF N1 LT N2.
  2826.  
  2827.                  Note: "NE" is not ASPECT/PROCOMM compatible.
  2828.  
  2829.                  Note: An expressions may be used in place of Nx
  2830.                  or Ny, if the expression is parentheticized.
  2831.                  For example: "IF GT (N0-5) 25" is allowed.
  2832.  
  2833.          Nx <cc> Ny      COM-AND allows the normal comparison form to be
  2834.                  used, as well.  However, as conditional evalua-
  2835.                  tion allows parentheses, the first numeric ex-
  2836.                  pression DOES NOT allow parentheses.  Opening
  2837.                  parens of a conditional expression are taken to
  2838.                  apply to the conditional, not the numeric.  For
  2839.                  example:
  2840.                       IF (N10-2) eq 5    ; Always fails
  2841.                       IF N10-2 eq 5    ; Is fine
  2842.                       IF (N10-2 eq 5)    ; Is fine, too
  2843.  
  2844.  
  2845.          [Discussion continues on the next page.]
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859. Version 2.6: 900426
  2860.  
  2861. COM-AND: IBM PC Communication Script Language                 Page  48
  2862.  
  2863.  
  2864. V.    Script Language Commands (continued)
  2865.  
  2866.  
  2867.  ->    IF <condition> (continued)
  2868.  
  2869.          IF conditions may be joined with AND, OR, and XOR within one
  2870.          IF statement.  Parentheticization is also supported.  For
  2871.          example, the statement:
  2872.  
  2873.              IF NOT (FLAG(0) or FLAG(1)) and FLAG(2)
  2874.             ...
  2875.  ->            ENDIF
  2876.  
  2877.          AND's FLAG(2) with the negated result of an OR between FLAG(0)
  2878.          and FLAG(1).  All clauses are evaluated before the IF is per-
  2879.          formed.  In simpler words, FLAG(2) must be "on", AND both
  2880.          FLAG(1) and FLAG(0) must be "off".
  2881.  
  2882.          In the above example, the NOT applies to the result of the
  2883.          parenthetical "(FLAG(0) or FLAG(1))".  When NOT precedes a
  2884.          condition without parentheses it applies ONLY to that condi-
  2885.          tion.   For example the two fragments below are equivalent:
  2886.  
  2887.          IF NOT FLAG(0) and FLAG(1)  =   IF NOT FLAG(0)
  2888.         ...             =    IF FLAG(1)
  2889.  ->        ENDIF             =       ...
  2890.                      =       ENDIF
  2891.                      =    ENDIF
  2892.  
  2893.  ->    INC Nx
  2894.  
  2895.          The INC command performs the instruction:    Nx = Nx+1.  No error
  2896.          checking is performed;  should the value exceed the range of a
  2897.          numeric variable, results are unpredictable.  Example:
  2898.  
  2899.  ->         INC N1             ; N1 = N1+1
  2900.  
  2901.  ->    INIT Nx <number>
  2902.  
  2903.          The INIT statement assigns a value to a numeric variable just as
  2904.          ASSIGN assigns a value to a string variable.  Example:
  2905.  
  2906.  ->         INIT N5 5             ; Initialize N5
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914. Version 2.6: 900426
  2915.  
  2916. COM-AND: IBM PC Communication Script Language                 Page  49
  2917.  
  2918.  
  2919. V.    Script Language Commands (continued)
  2920.  
  2921.  
  2922.     INPUT Nx <address>
  2923.  
  2924.          The INPUT statement performs a machine level INPUT instruction
  2925.          using the address given.  WARNING: If you're not sure what a
  2926.          'machine level INPUT instruction' is... do not use this!
  2927.  
  2928.          INPUT N0 0x61         ; Read the speaker driver chip
  2929.  
  2930.     ISDLFILE <string>
  2931.  
  2932.          The ISDLFILE statement tests for the presence of a file named in
  2933.          <string> in the current download directory (see SET DLDIR).
  2934.          <String> must contain an unqualified file.ext, (it should not
  2935.          contain a fully pathed file name).  ISDLFILE sets the SUCCESS
  2936.          condition according to the presence of the named file.
  2937.          Example:
  2938.  
  2939.          ISDLFILE "COM-AND.EXE"  ; Is this file in download dir?
  2940.  
  2941.          Note that ISDLFILE may also be used with IF as the condi-
  2942.          tional test (e.g. IF ISDLFILE S0 ...).
  2943.  
  2944.  ->    ISFILE <string>
  2945.  
  2946.          The ISFILE statement tests for the presence of a file named in
  2947.          <string>.    <String> contains an unqualified file.ext (or may
  2948.          contain a fully pathed file name).  ISFILE sets the SUCCESS
  2949.          condition according to the presence of the named file.  Example:
  2950.  
  2951.  ->         ISFILE "COM-AND.EXE"    ; Is this file in current dir?
  2952.          ISFILE "D:\COM-AND\COM-AND.EXE"
  2953.  
  2954.          Note that ISFILE may also be used with IF as the condi-
  2955.          tional test (e.g. IF ISFILE S0 ...).
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969. Version 2.6: 900426
  2970.  
  2971. COM-AND: IBM PC Communication Script Language                 Page  50
  2972.  
  2973.  
  2974. V.    Script Language Commands (continued)
  2975.  
  2976.  
  2977.     ISSCFILE <string>
  2978.  
  2979.          The ISSCFILE statement tests for the presence of a potential
  2980.          script file named in <string> in the current directory and in
  2981.          the drive:subdirectory specified through the COM-AND= environ-
  2982.          ment variable.  <String> must contain an unqualified file.ext,
  2983.          (or may contain a fully pathed file name).  The SUCCESS
  2984.          condition is set according to the presence of the named file.
  2985.          Example:
  2986.  
  2987.          ISSCFILE "STCLOGON'     ; Is this file available?
  2988.  
  2989.          Note that ISSCFILE may also be used with IF as the condi-
  2990.          tional test (e.g. IF ISSCFILE S0 ...).
  2991.  
  2992.  ->    ITOA Nx Sx
  2993.  
  2994.          The ITOA statement converts a value in a numeric variable to a
  2995.          string variable.  The value is left justified, with leading
  2996.          zeroes suppressed.  Example:
  2997.  
  2998.          N0 = 0             ; N0 now contains 0
  2999.  ->         ITOA N0 S1          ; S1 now contains "0"
  3000.  
  3001.     ITOC Nx Sx[(#)]
  3002.  
  3003.          The ITOC statement converts a value to a single character (for
  3004.          non-ASCII values).  Only a single character is deposited, the
  3005.          low 8 bits of the value.  Example:
  3006.  
  3007.          N0 = 1             ; N0 now contains 1 (which is SOH)
  3008.          ITOC N0 S1          ; S1(0:0) now contains SOH
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024. Version 2.6: 900426
  3025.  
  3026. COM-AND: IBM PC Communication Script Language                 Page  51
  3027.  
  3028.  
  3029. V.    Script Language Commands (continued)
  3030.  
  3031.  ->    KEYGET Sx
  3032.  
  3033.          The KEYGET statement waits for and reads a single keystroke.
  3034.          The returned string is formatted so that the various possible
  3035.          keys are distinguishable.
  3036.  
  3037.          Printable ASCII keystrokes return one character in Sx.
  3038.  
  3039.          Non-printable ASCII keystrokes (e.g.  ESC) are returned as two
  3040.          hex digits (e.g.  ESC returns "1B").
  3041.  
  3042.          Special keys (function and cursor keys) are returned as four hex
  3043.          digits, the last two being '00'.  For example, the F1 key is
  3044.          returned as "3B00".  Example:
  3045.  
  3046.  ->         KEYGET S3             ; Read one keystroke
  3047.  
  3048.  ->    KFLUSH
  3049.  
  3050.          The KFLUSH statement flushes the keyboard of keystrokes.  It is
  3051.          intended for conditions where type-ahead is not appropriate
  3052.          (e.g.  under error conditions).  Example:
  3053.  
  3054.  ->         KFLUSH             ; Throw away key entry
  3055.  
  3056.     LD Sx <number>
  3057.  
  3058.          The LD command returns a long distance string from the dialing
  3059.          directory (or blanks).  A directory number may be specified
  3060.          (0,1,2,3,4 are allowed, 1="+",2="-",3="#",4="@", and 0 is a
  3061.          place holder).  Note the number field is not optional.  Example:
  3062.  
  3063.          LD S0 1                 ; Fetch the "+" string
  3064.  
  3065.     LEGEND <string>
  3066.  
  3067.          The LEGEND statement places the given text into the status line
  3068.          on the 25th line of the screen.  If <string> is blank, the
  3069.          status line reverts to COM-AND status line notes during script
  3070.          processing.  Example:
  3071.  
  3072.          LEGEND "Scripted host mode in effect: Press ESC to abort"
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079. Version 2.6: 900426
  3080.  
  3081. COM-AND: IBM PC Communication Script Language                 Page  52
  3082.  
  3083.  
  3084. V.    Script Language Commands (continued)
  3085.  
  3086.  
  3087.     LENGTH Sx Nx
  3088.  
  3089.          The LENGTH statement computes the current length of the string
  3090.          Sx (1,2,3...80) and places length in the numeric variable Nx.
  3091.          Example:
  3092.  
  3093.          S0 = "   "              ; Set-up a value
  3094.          LENGTH S0 N0         ; N0 should now contain 3
  3095.  
  3096.          Note that lengths range from 0 through 80, while character
  3097.          positions range from 0 through 79.
  3098.  
  3099.     LJ Sx
  3100.  
  3101.          The LJ command left justifies the contents of the given string
  3102.          variable (within its actual length).  Example:
  3103.  
  3104.          LJ S0                 ; Left justify
  3105.  
  3106.     LOAD (DIAL!MACR!ACCE!DEFA!ALLOC) <fname for DIAL/MACR/ACCE/ALLOC>
  3107.  
  3108.          The LOAD command loads a settings file (either the dialing
  3109.          directory, macro definition, accessory definition, defaults,
  3110.          or allocated variables).  Note that 'LOAD DIAL "name"' is
  3111.          equivalent to 'DLOAD "name"'.  MLOAD, ALOAD and RESET are
  3112.          similarly redefined.  Example:
  3113.  
  3114.          LOAD DIAL "com-and.dir"         ; Load original dial dir
  3115.          LOAD DEFAULT             ; Note: takes no file name
  3116.  
  3117.  ->    LOCATE <number> <number>
  3118.  
  3119.          The LOCATE statement positions the cursor to the row and
  3120.          optionally the column specified by the arguments.    The first
  3121.          argument is the row number (0-24, or 0-42).  The second number
  3122.          is the column number (0-79).  Note that a column argument
  3123.          requires a row argument.  Example:
  3124.  
  3125.  ->         LOCATE  0,0         ; Position to home (upper left)
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134. Version 2.6: 900426
  3135.  
  3136. COM-AND: IBM PC Communication Script Language                 Page  53
  3137.  
  3138.  
  3139. V.    Script Language Commands (continued)
  3140.  
  3141.  
  3142.  ->    LOG OPEN <string>
  3143.  ->    LOG CLOSE
  3144.  ->    LOG SUSPEND
  3145.  ->    LOG RESUME
  3146.     LOG MARKED (ON!OFF)
  3147.  
  3148.          The LOG subcommands OPEN a file for logging, CLOSE an open LOG
  3149.          file, SUSPEND logging, RESUME logging after suspension, and turn
  3150.          timestamp MARKing in the log on/off.
  3151.  
  3152.          The LOG OPEN command requires a file name in <string>.  <String>
  3153.          contains an unqualified file.ext (or may contain a fully
  3154.          pathed file name, not PROCOMM compatible).  Example:
  3155.  
  3156.  ->         LOG OPEN "Log.txt"      ; Open log file and start logging
  3157.          LOG OPEN "E:log.txt"    ; OPen log on RAM drive
  3158.  
  3159.          LOG OPEN sets the SUCCESS/FAILURE condition (tested with
  3160.          the IF statement).
  3161.  
  3162.     LOWER Sx
  3163.  
  3164.          The LOWER statement lower cases all alphabetic characters in Sx.
  3165.          Example:
  3166.  
  3167.          LOWER S5             ; Force all lower case
  3168.  
  3169.  ->    MACRO <number> [Sx]
  3170.  
  3171.          The MACRO statement will (1) transmit macro number 0-9 from the
  3172.          currently open Macro Definition file (Alt-M) or (2) deposit the
  3173.          macro string 0-9 into a string variable.  Example:
  3174.  
  3175.  ->         MACRO 8             ; Send macro #8, which winks
  3176.          MACRO 8 S0          ; Read macro #8 into a string variable
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189. Version 2.6: 900426
  3190.  
  3191. COM-AND: IBM PC Communication Script Language                 Page  54
  3192.  
  3193.  
  3194. V.    Script Language Commands (continued)
  3195.  
  3196.  
  3197.  ->    MATGET row col attr len Sx
  3198.  
  3199.          The MATGET statement performs the MGET function, i.e.  reading
  3200.          the keyboard for a length with masked echo, with cursor
  3201.          positioning and color control.  Example:
  3202.  
  3203.  ->         MATGET 0 0 15 5 S5      ; Read up to 5 chars into S5 from 0,0
  3204.          MATGET 0 0 (black white) 5 S5
  3205.  
  3206.          Note that the cursor is left positioned after the last
  3207.          character read.
  3208.  
  3209.  ->    MDIAL <string>
  3210.  
  3211.          The MDIAL statement dials the number in <string> manually.  The
  3212.          value in <string> must be a valid (to the modem) telephone num-
  3213.          ber, and is limited to 14 characters width.  Example:
  3214.  
  3215.  ->         MDIAL "245-9110"        ; Dial P/Link direct
  3216.  
  3217.  ->    MESSAGE <string>
  3218.  
  3219.          The MESSAGE statement displays a line of text on the local
  3220.          console.  If logging is enabled, the text is logged as well.
  3221.          Control characters (such as ^G, bell) are embedded in the usual
  3222.          manner.  No carriage return/line feed is issued with the
  3223.          <string> unless contained in <string>.  Example:
  3224.  
  3225.  ->         MESSAGE "^GDialing the SOURCE^M"
  3226.  
  3227.  ->    MGET Sx <number>
  3228.  
  3229.          The MGET statement works exactly as the GET statement, taking
  3230.          text from the keyboard (up to a carriage return or <number>
  3231.          length).  However, the echo is 'masked'.  Asterisks are echoed
  3232.          in place of the entry.  Example:
  3233.  
  3234.  ->         SET DUPLEX HALF         ; Turn off local echo
  3235.  ->         MESSAGE "^MEnter a password:"
  3236.  ->         MGET S0 15          ; Get up to 15 characters
  3237.  ->         TRANSMIT S0         ; Transmit the entry
  3238.  ->         TRANSMIT "^M"           ; And a cr to terminate
  3239.  ->         SET DUPLEX FULL         ; Turn echo back on
  3240.  
  3241.  
  3242.  
  3243.  
  3244. Version 2.6: 900426
  3245.  
  3246. COM-AND: IBM PC Communication Script Language                 Page  55
  3247.  
  3248.  
  3249. V.    Script Language Commands (continued)
  3250.  
  3251.  
  3252.  ->    MLOAD <string>
  3253.  
  3254.          The MLOAD statement loads a new Macro Definition file (Alt-M).
  3255.          The MLOAD command requires a file name in <string>.  <String>
  3256.          contains an unqualified file.ext (or may contain a fully
  3257.          pathed file name).  Example:
  3258.  
  3259.  ->         MLOAD "COM-AND.MAC"           ; Load original macro def
  3260.          MLOAD "C:\SOURCE\COM-AND.MAC" ; Load special macros
  3261.  
  3262.          Note: The file name is limited to 27 characters in length.
  3263.  
  3264.     MSR Nx
  3265.  
  3266.          The MSR command reads the modem status register and returns the
  3267.          8 bit value in a numeric register.  The format of the MSR will
  3268.          not be detailed here (refer to your modem's documentation).
  3269.          Example:
  3270.  
  3271.          MSR N0             ; Read the MSR
  3272.  
  3273.  ->    MUL Nx Ny Nz
  3274.  
  3275.          The MUL command performs the instruction:    Nz = Nx*Ny.  No error
  3276.          checking is performed;  should the value exceed the range of a
  3277.          numeric variable, results are unpredictable.  Example:
  3278.  
  3279.  ->         MUL N1 N2 N3         ; N3 = N1*N2
  3280.  
  3281.          An expression may be used for Nx or Ny if it is entirely
  3282.          contained within parentheses.
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299. Version 2.6: 900426
  3300.  
  3301. COM-AND: IBM PC Communication Script Language                 Page  56
  3302.  
  3303.  
  3304. V.    Script Language Commands (continued)
  3305.  
  3306.  
  3307.     Nx = <expression>
  3308.  
  3309.          Numeric expressions may be computed and assigned directly with
  3310.          the syntax "Nx = <expression>".  <Expression> is any legitimate
  3311.          algebraic statement.  For example:
  3312.  
  3313.          N0 = N1*(N2+N3)
  3314.          N0 = N5 = N1*(N2+N3)
  3315.  
  3316.          Values may be literal or numeric variables.  Operators are:
  3317.  
  3318.          "+", (addition),
  3319.          "-", (subtraction),
  3320.          "/", (division),
  3321.          "*", (multiplication),
  3322.          "\", (returns the remainder of division),
  3323.          "="  (store partial result)
  3324.          "~"  (bitwise complement),
  3325.          "&"  (bitwise AND),
  3326.          "|"  (bitwise OR),
  3327.          "^"  (bitwise XOR),
  3328.  
  3329.  
  3330.          Parentheses may be used to clarify ambiguous expressions (unless
  3331.          parentheses are used, the expression is evaluated from left to
  3332.          right), with the following precedences:
  3333.  
  3334.          "(",")"                 highest precedence
  3335.          "~", "&", "|", "^"      second precedence
  3336.          "*", "/" and "\"        third precedence
  3337.          "+" and "-"             fourth precedence
  3338.          "="                     lowest precedence
  3339.  
  3340.          Numeric variables may also be 'indexed'.  For example, N0[1] is
  3341.          N1, N1[1] is N2, and so on.  Arithmetic expressions are allowed
  3342.          as indices.  Indices may be used on either side of a store (e.g.
  3343.          "N0[N1] = N2[N3]").  An index does not 'wrap' (i.e.  N0[-1] is
  3344.          N0, not N99).
  3345.  
  3346.          Strings and substrings may be used if they contain valid numeric
  3347.          values.  A zero is used (and the ERROR flag is not set) if a
  3348.          string does not contain a valid numeric value.
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354. Version 2.6: 900426
  3355.  
  3356. COM-AND: IBM PC Communication Script Language                 Page  57
  3357.  
  3358.  
  3359. V.    Script Language Commands (continued)
  3360.  
  3361.  
  3362.     OUTPUT <address> Nx
  3363.  
  3364.          The OUTPUT statement performs a machine level OUTPUT instruction
  3365.          using the address given.  WARNING: If you're not sure what a
  3366.          'machine level OUTPUT instruction' is... do not use this!
  3367.  
  3368.          OUTPUT N0 0x61         ; Write the speaker driver chip
  3369.  
  3370.     ON ESCAPE GOSUB <label>
  3371.  
  3372.          The ON ESCAPE GOSUB statement specifies special action to be
  3373.          taken when the operator presses the ESC key.  If this is not
  3374.          set, the operator is prompted "Do you wish to terminate the
  3375.          script?".  The script writer may choose to intercept the ESC key
  3376.          with a subroutine for the special action.    Example:
  3377.  
  3378.          ON ESCAPE GOSUB ESCAPE  ; Subroutine label had best exist!
  3379.  
  3380.          Like the GOSUB statement, the operand of this statement may be a
  3381.          literal label, a quoted label, or a string variable containing
  3382.          the label as text.
  3383.  
  3384.          Note:  Giving the label as blank is equivalent to the statement
  3385.          ON ESCAPE CLEAR, below.  The ON ESCAPE label may be read (using
  3386.          the "_ONEScape" intrinsic), changed, and later reset to its
  3387.          previous condition, using this fact.
  3388.  
  3389.     ON ESCAPE CLEAR
  3390.  
  3391.          The ON ESCAPE CLEAR statement clears a previous ON ESCAPE GOSUB
  3392.          setting.  After this statement, pressing the ESC key will result
  3393.          in the COM-AND prompt "Do you wish to terminate the script?".
  3394.          Example:
  3395.  
  3396.          ON ESCAPE CLEAR         ; Return to default condition
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409. Version 2.6: 900426
  3410.  
  3411. COM-AND: IBM PC Communication Script Language                 Page  58
  3412.  
  3413.  
  3414. V.    Script Language Commands (continued)
  3415.  
  3416.  
  3417.     ON SILENCE GOSUB <label>
  3418.  
  3419.          The ON SILENCE GOSUB statement specifies special action to be
  3420.          taken after a <duration> of silence on the comm line.  The
  3421.          <duration> defaults to 300 seconds (5 min), and may be set with
  3422.          the SET SILENCE command.
  3423.  
  3424.          ON SILENCE GOSUB Disconn ; Subroutine label had best exist!
  3425.  
  3426.          Like the GOSUB statement, the operand of this statement may be a
  3427.          literal label, a quoted label, or a string variable containing
  3428.          the label as text.
  3429.  
  3430.          Note:  The script must allow the comm port to be read... with
  3431.          one of the following: RGET, or PAUSE.  Note that SUSPEND super-
  3432.          cedes the ON SILENCE condition.
  3433.  
  3434.          Note:  When the GOSUB is executed, the ON SILENCE trap is turned
  3435.          off.  If it is to be used again, a new ON SILENCE GOSUB must be
  3436.          performed (best in the subroutine itself).
  3437.  
  3438.          Note:  The ON SILENCE command 'primes' the timer.  Therefore, a
  3439.          loop containing ON SILENCE... will never timeout!    The timer
  3440.          will be continuously reset.
  3441.  
  3442.     ON SILENCE CLEAR
  3443.  
  3444.          The ON SILENCE CLEAR statement clears a previous ON SILENCE
  3445.          setting.  After this statement, the comm port is not tested
  3446.          for silence.  Example:
  3447.  
  3448.          ON SILENCE CLEAR         ; Return to default condition
  3449.  
  3450.     OVERLAY <file name>         ; Load a file for use
  3451.     OVERLAY CLEAR             ; Clear a loaded file
  3452.  
  3453.          The OVERLAY statement loads an EXE or COM format file as machine
  3454.          language subroutines for COM-AND scripts.    Routines are invoked
  3455.          in the overlay with the SCALL statement.  Example:
  3456.  
  3457.          OVERLAY "talker.ovl"    ; Load voice synth routines
  3458.  
  3459.          The OVERLAY statement sets SUCCESS/FAIL according to the result
  3460.          of the attempt.  Refer to Appendix K for more discussion.
  3461.  
  3462.  
  3463.  
  3464. Version 2.6: 900426
  3465.  
  3466. COM-AND: IBM PC Communication Script Language                 Page  59
  3467.  
  3468.  
  3469. V.    Script Language Commands (continued)
  3470.  
  3471.  
  3472.  ->    PAUSE [<number>]
  3473.  
  3474.          The PAUSE statement pauses the script file for a given number of
  3475.          seconds.  The delay period defaults to 60 seconds, but may be
  3476.          explicitly set with the numeric argument.    Text received during
  3477.          the PAUSE period is displayed on the CRT, and analyzed for WHEN
  3478.          triggers.    Example:
  3479.  
  3480.  ->         PAUSE 300             ; Pause for 5 minutes
  3481.  
  3482.     PERFORM <string>
  3483.  
  3484.          The PERFORM statement executes the given string as a command.
  3485.          Self modifying code is not recommended, but remote control of
  3486.          COM-AND is easily implemented with this command.  Example:
  3487.  
  3488.          S0 = "EXIT"             ; Place a command in S0
  3489.          PERFORM S0          ; Execute S0 as a command
  3490.  
  3491.     PLAY <string>
  3492.  
  3493.          The PLAY statement plays the BASIC encoded music statement in
  3494.          <string>.    The ERROR condition is set if the string cannot be
  3495.          parsed (and is therefore not sounded).  Refer to the appendices
  3496.          for the syntax of the play statement.  Example:
  3497.  
  3498.          PLAY "t220 l8 edcdeee2 ddd2 egg2 edcdeee2 ed.d8edc1"
  3499.  
  3500.     PRESERVE Sx
  3501.  
  3502.          When a value is received (either RGET, GET or MGET), it may
  3503.          contain '!'s and '^'s that would be interpreted as special
  3504.          characters ('!' = carriage return, and '^' = control).  The
  3505.          PRESERVE command, applied to a received string variable will
  3506.          modify the value so that a subsequent TRANSMIT or MESSAGE
  3507.          command sends exactly what was received.  Example:
  3508.  
  3509.          SET RDISPLAY OFF         ; Turn off display of rec'd characters
  3510.  ->         RGET S9             ; Read the comm line
  3511.  ->         IF SUCCESS          ; If not a timeout
  3512.         PRESERVE S9         ; Modify to preserve values
  3513.  ->        MESSAGE S9         ; Display on console
  3514.  ->        MESSAGE "^M"         ; And a carriage rtn
  3515.  ->        ENDIF
  3516.  
  3517.  
  3518.  
  3519. Version 2.6: 900426
  3520.  
  3521. COM-AND: IBM PC Communication Script Language                 Page  60
  3522.  
  3523.  
  3524. V.    Script Language Commands (continued)
  3525.  
  3526.  
  3527.     PRINT <string>
  3528.  
  3529.          The PRIN command sends the <string> to the LP1 logging device.
  3530.          The usual string edits are performed first;  however, unlike
  3531.          MESSAGE, no line advance is performed first.
  3532.  
  3533.          The PRINT command ignores the setting of the PRINTER ON!OFF
  3534.          (Ctl-PrtSc) state;  it prints regardless.    Printer error aborts
  3535.          the line, but the next PRINT command is not disabled.  Example:
  3536.  
  3537.          PRINT "^L"              ; Send a top-of-form
  3538.  
  3539.  ->    PRINTER (ON!OFF)
  3540.  
  3541.          The PRINTER command turns on and off the local LP1 logging of
  3542.          received (and echoed) text.
  3543.  
  3544.  ->    QUIT
  3545.  
  3546.          The QUIT command terminates the script execution and COM-AND.
  3547.          It may be coded at any level (for example within a subroutine
  3548.          reached through a call from a subroutine).  Example:
  3549.  
  3550.  ->         QUIT             ; Terminate the script and program
  3551.          ; Nothing past this point in the script will be performed.
  3552.  
  3553.          Note also the BYE command.
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574. Version 2.6: 900426
  3575.  
  3576. COM-AND: IBM PC Communication Script Language                 Page  61
  3577.  
  3578.  
  3579. V.    Script Language Commands (continued)
  3580.  
  3581.  
  3582.     READ Sx Nx Ny
  3583.  
  3584.          The READ command reads a string (up to Nx characters) into a
  3585.          string variable.  The input file must be opened by FOPENI.
  3586.  
  3587.          READ reads up to 80 characters into Sx.  If the input file was
  3588.          opened in TEXT mode, the read string terminates at the 80th byte
  3589.          or at a CR/LF pair (NOT placed in Sx as a single CR).  The count
  3590.          read is placed in Ny.  Example:
  3591.  
  3592.          READ S0 80 N4         ; Read 80 bytes; count read in N4
  3593.  
  3594.          In TEXT mode, the READ function terminates when a CR/LF is en-
  3595.          countered.  In TEXT mode, tabs are expanded to blanks.  In TEXT
  3596.          mode, the READ command stops on an ASCII EOF character (Ctl-Z)
  3597.          as well as on true end-of-file (size).
  3598.  
  3599.          In TEXT mode, when an empty record is encountered (i.e. CR/LF),
  3600.          the returned length is 0 and the returned buffer is empty.  When
  3601.          a record longer than 80 characters is encountered, the first
  3602.          READ returns a length of 80 and subsequent READ statement(s)
  3603.          return the remainder of the record.  Special note should be made
  3604.          of cases where a length of 80 exactly is returned.  Should the
  3605.          next READ return a length of 0, the record was 80 text charac-
  3606.          ters, and the 0 length record represents the record's CR/LF.
  3607.  
  3608.          The READ command sets the EOF condition on input EOF.  This may
  3609.          be tested with an 'IF EOF'.  On EOF the buffer is returned null.
  3610.  
  3611.     RENAME <oldfile> <newfile>
  3612.  
  3613.          The RENAME statement renames a file named in the command.    The
  3614.          SUCCESS flag is set according to the result of the command.
  3615.          Example:
  3616.  
  3617.          RENAME "COM-AND.LOG" "COM-AND.OLD"
  3618.  
  3619.     RESET
  3620.  
  3621.          The RESET statement restores default settings (Alt-S, Alt-O, and
  3622.          Alt-P) to their load-time values.    It also restores the default
  3623.          download subdirectory.  It does not reset the current
  3624.          subdirectory or the scrolling region coordinates.
  3625.  
  3626.          RESET             ; Restore default parameters
  3627.  
  3628.  
  3629. Version 2.6: 900426
  3630.  
  3631. COM-AND: IBM PC Communication Script Language                 Page  62
  3632.  
  3633.  
  3634. V.    Script Language Commands (continued)
  3635.  
  3636.  
  3637.     RESTORE
  3638.  
  3639.          The RESTORE statement restores an area saved by the SAVE
  3640.          statement.  The coordinates used by the SAVE statement are
  3641.          implicit to the RESTORE statement.  The RESTORE statement sets
  3642.          the SUCCESS flag according to save-stack underflow.
  3643.  
  3644.          RESTORE             ; Restore saved area
  3645.  
  3646.  ->    RETURN
  3647.  
  3648.          The RETURN command transfers control of the script processor to
  3649.          the last GOSUB executed.  RETURN effectively cancels the domain
  3650.          of any IF or SWITCH statement being processed.  The RETURN may
  3651.          be coded at any level (for example within an IF within a
  3652.          subroutine).  Example:
  3653.  
  3654.  ->         LABEL:
  3655.          ...
  3656.  ->         RETURN             ; Return to caller
  3657.  
  3658.     REWIND
  3659.  
  3660.          The REWIND statement rewinds the input file (if open).  The
  3661.          SUCCESS flag is set according to the result of the command.
  3662.          Example:
  3663.  
  3664.          REWIND             ; REWIND the input file
  3665.  
  3666.  ->    RFLUSH
  3667.  
  3668.          The RFLUSH command flushes the receiver buffer of received text.
  3669.          Text being flushed is not displayed at the CRT.  Example:
  3670.  
  3671.  ->         RFLUSH             ; Flush anything left over
  3672.  ->         HANGUP             ; Disconnect the call
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684. Version 2.6: 900426
  3685.  
  3686. COM-AND: IBM PC Communication Script Language                 Page  63
  3687.  
  3688.  
  3689. V.    Script Language Commands (continued)
  3690.  
  3691.  
  3692.  ->    RGET Sx [<number> [<number>]]
  3693.  
  3694.          The RGET command reads the comm port for text.  Received text is
  3695.          terminated by a carriage return (in RMODE ASCII), or, if the
  3696.          optional first numeric argument was supplied, after <number>
  3697.          characters.  Receipt may also be terminated after a stated or
  3698.          unstated period of time (default is 60 seconds; the value may be
  3699.          changed with the optional second numeric argument).  Example:
  3700.  
  3701.  ->         RGET S0 24 300          ; Wait up to 5 mins for 24 characters
  3702.  
  3703.          Note that the delay interval cannot be specified without the
  3704.          first numeric argument (length) also present.
  3705.  
  3706.          Note that if WHEN triggers are to be performed during an RGET,
  3707.          the RGET length must be greater than the largest WHEN trigger
  3708.          string.
  3709.  
  3710.          RGET sets the SUCCESS/FAILURE condition (which may then be
  3711.          tested with the IF statement).
  3712.  
  3713.          RGET will read in either an ASCII or BINARY mode.    Its default
  3714.          is ASCII.    In ASCII mode, nulls and linefeeds are ignored,
  3715.          carriage returns end the RGET, and backspaces are performed.  In
  3716.          binary mode, the RGET is terminated only by length.  The RGET
  3717.          mode is set with the SET RMODE statement.
  3718.  
  3719.     RJ Sx
  3720.  
  3721.          The RJ command right justifies the contents of the given string
  3722.          variable (within its actual length).  Example:
  3723.  
  3724.          RJ S0                 ; Right justify
  3725.  
  3726.     RND <modulus> Nx
  3727.  
  3728.          The RND command computes a random number (smaller than the given
  3729.          modulus value) and places the value in Nx.  Example:
  3730.  
  3731.          RND 6 N0             ; Roll one six faced die (n0 = 0 to 5)
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739. Version 2.6: 900426
  3740.  
  3741. COM-AND: IBM PC Communication Script Language                 Page  64
  3742.  
  3743.  
  3744. V.    Script Language Commands (continued)
  3745.  
  3746.  
  3747.  ->    RUN <string> [WAIT]
  3748.  
  3749.          The RUN command executes any executable program that may be
  3750.          loaded 'on top of' COM-AND.  The RUN command will not work if
  3751.          there is not sufficient memory to load the new program.
  3752.  
  3753.          Parameters may be passed to the new program by including
  3754.          them after the file name.    Example:
  3755.  
  3756.  ->         RUN "VCOLIB.EXE"             ; Load VCOLIB (menu mode)
  3757.          RUN "VCOLIB.EXE L GENIE.FLB" ; Load and list to CRT
  3758.  
  3759.          The optional keyword WAIT signals that COM-AND is to pause
  3760.          after completion for a keypress before the script continues.
  3761.  
  3762.          This command sets the SUCCESS condition according to the error
  3763.          level returned to DOS by the target program.
  3764.  
  3765.          NOTE:  The screen is saved prior to the RUN function, for
  3766.          restoration upon completion.  However, the screen size saved
  3767.          is defined by the DWINDOW currently in effect!
  3768.  
  3769.     SAVE row col row col
  3770.  
  3771.          The SAVE statement saves an area of screen on a stack.  The
  3772.          first and second arguments specify the row/column of the
  3773.          top-left of the region.  The third and fourth arguments specify
  3774.          the row/column of the bottom-right of the region.    Up to 20
  3775.          regions may be saved at one time.    The SUCCESS flag is set/reset
  3776.          according to save-stack overflow.    Example:
  3777.  
  3778.          SAVE 0 10,10 20,20       ; Save a narrow box.
  3779.  
  3780.     SCALL <addr> [parms [,parms]]
  3781.  
  3782.          The SCALL instruction invokes a procedure in an overlay.  The
  3783.          address of the procedure (relative to the first 64K) must be
  3784.          supplied.    Optional numeric (nx) and string (Sx, Vx) variables
  3785.          may be listed after the mandatory address.  All parameters are
  3786.          passed by reference and may therefore be modified by the over-
  3787.          lay routine.  For example:
  3788.  
  3789.          SCALL 3 N0            ; Invoke proc at addr 3, pass/rtn N0
  3790.  
  3791.  
  3792.  
  3793.  
  3794. Version 2.6: 900426
  3795.  
  3796. COM-AND: IBM PC Communication Script Language                 Page  65
  3797.  
  3798.  
  3799. V.    Script Language Commands (continued)
  3800.  
  3801.  
  3802.     SCREEN row col row col attr Sx
  3803.  
  3804.          The SCREEN statement provides for a multi-line display within
  3805.          an area on the screen.  The leftmost column and the number of
  3806.          lines to be be displayed are defined by the box coordinates.
  3807.          The color attribute is used on each line displayed.  Lines are
  3808.          displayed string with the string variable given, and proceeding
  3809.          in sequence.  For example:
  3810.  
  3811.          SCREEN 10,10 20,20 (black white) S0
  3812.  
  3813.          displays 11 lines from variables S0 through S10.  Note that the
  3814.          given attribute ONLY applies to text written (not the whole box)
  3815.          and that the box width does NOT limit the line length displayed.
  3816.  
  3817.  ->    SCROLL cnt row col row col attr
  3818.  
  3819.          The SCROLL statement scrolls a region on the screen, filling the
  3820.          new lines with the specified color.  The first argument <cnt>
  3821.          specifies the number of lines to scroll (0 implies that the
  3822.          region is to be cleared).    The second and third arguments
  3823.          specify the row/column of the top-left of the region.  The
  3824.          fourth and fifth arguments specify the row/column of the
  3825.          bottom-right of the region.  The last argument specifies the
  3826.          color attribute to be used on the new line.  Example:
  3827.  
  3828.  ->         SCROLL 0 10,10 20,20 15         ; White on black:    narrow box
  3829.          SCROLL 0 10,10 20,20 (black white)
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849. Version 2.6: 900426
  3850.  
  3851. COM-AND: IBM PC Communication Script Language                 Page  66
  3852.  
  3853.  
  3854. V.    Script Language Commands (continued)
  3855.  
  3856.  
  3857.  ->    SENDFILE ASCII      <string>    ; A.K.A. Buffer capture
  3858.  ->    SENDFILE BYMODEM  <string>    ; Batch YMODEM
  3859.  ->    SENDFILE BYMODEMG <string>    ; Batch YMODEM-G (BYMOG works too)
  3860.  ->    SENDFILE CISB              ; CompuServe B-protocol
  3861.  ->    SENDFILE KERMIT   <string>    ; Kermit or SuperKermit
  3862.     SENDFILE QUICKB           ; CompuServe Quick B-protocol
  3863.  ->    SENDFILE RXMODEM  <string>    ; Relaxed CRC or Checksum XMODEM
  3864.  ->    SENDFILE WXMODEM  <string>    ; Windowed XMODEM
  3865.  ->    SENDFILE XMODEM   <string>    ; CRC or Checksum XMODEM
  3866.  ->    SENDFILE YMODEM   <string>    ; Simple YMODEM (not True ... (TM))
  3867.     SENDFILE ZMODEM   <string>    ; ZMODEM transfer (batch)
  3868.  
  3869.          The SENDFILE statement initiates an upload using a specific
  3870.          protocol.    The <string> argument must specify a valid file name,
  3871.          and the file must exist.  The SENDFILE command sets the SUCCESS
  3872.          condition according to the transfer.  Example:
  3873.  
  3874.  ->         SENDFILE XMODEM "Com-and.arc"  ; Upload
  3875.  
  3876.          Note that, in the case of CISB and QUICKB, you tell the host the
  3877.          name the file will take on your machine.
  3878.  
  3879.          Note that CIS-B ( and QuickB) provide an automated upload
  3880.          function.    The automated function is NOT available within a
  3881.          script unless the script is 'reading the port', i.e.  with an
  3882.          RGET, PAUSE or SUSPEND statement.
  3883.  
  3884.  ->    SET <command...>
  3885.  
  3886.          The SET commands are discussed below in a chapter alone.
  3887.  
  3888.  ->    SHELL
  3889.  
  3890.          The SHELL command shell's to DOS using COMMAND.COM or the
  3891.          command line interpretor indicated by the 'COMSPEC=' envi-
  3892.          ronment variable.    Having shelled to DOS, DOS commands may be
  3893.          executed...  however, the shell must be exited for the script to
  3894.          continue.    COMMAND.COM is exited with the command "Exit".
  3895.          Example:
  3896.  
  3897.  ->         SHELL             ; shell to DOS
  3898.  
  3899.          NOTE: The screen is saved prior to the SHELL function, for
  3900.          restoration upon completion.  However, the screen size saved
  3901.          is defined by the DWINDOW currently in effect!
  3902.  
  3903.  
  3904. Version 2.6: 900426
  3905.  
  3906. COM-AND: IBM PC Communication Script Language                 Page  67
  3907.  
  3908.  
  3909. V.    Script Language Commands (continued)
  3910.  
  3911.  
  3912.     SNAME Sx
  3913.  
  3914.          The SNAME command returns the current script file name in the
  3915.          variable given.  Example:
  3916.  
  3917.          SNAME S0             ; shell to DOS
  3918.  
  3919.          This function is provided to make it possible for a script that
  3920.          has been 'EXECUTE'd from another script file to return to the
  3921.          original script.  Note that when a script is started, all string
  3922.          variables are set to blank.  When a script is 'EXECUTE'd string
  3923.          variables retain their current values.
  3924.  
  3925.  ->    SOUND <number> <number>
  3926.  
  3927.          The SOUND statement generates a sound of a specific frequency
  3928.          for a duration specified in milliseconds.    The first argument is
  3929.          the frequency (in Hz).  The second argument is duration.  Both
  3930.          may be specified as literal values or as variables.  Example:
  3931.  
  3932.  ->         SOUND 440 500         ; Sound a 'A' for half-a-sec
  3933.  
  3934.     SSIZE Nx
  3935.  
  3936.          The SSIZE statement returns the current # of screen lines
  3937.          in the given numeric variable.  Example:
  3938.  
  3939.          SSIZE N0             ; Compute # screen lines
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959. Version 2.6: 900426
  3960.  
  3961. COM-AND: IBM PC Communication Script Language                 Page  68
  3962.  
  3963.  
  3964. V.    Script Language Commands (continued)
  3965.  
  3966.  
  3967.     STACK <string>
  3968.     STACK CLEAR
  3969.  
  3970.          The STACK statement stores the given string (if there is room)
  3971.          in the BIOS keyboard buffer.  STACK CLEAR clears the BIOS
  3972.          keyboard buffer.  STACK may be used prior to BYE to effect a
  3973.          chain to another program.    For example:
  3974.  
  3975.          STACK "PC-VCO!"         ; Stack cmd to load PC-VCO
  3976.  ->         BYE             ; Exit COM-AND without hanging up
  3977.  
  3978.          Note that STACK, like HITKEY, sets a state inhibiting type-
  3979.          through until the next KEYGET/GET/MGET/ATGET/MATGET/KFLUSH.
  3980.  
  3981.          To STACK a non-ASCII key, preceded the 'extended code' with null
  3982.          (^@).  Please refer to Appendix H of this document for a table
  3983.          of extended keycodes as used by the STACK command.
  3984.  
  3985.          Note that the STACK command uses the EBL keyboard stack, if EBL
  3986.          is available.  Refer to Appendix (F) below covering EBL for
  3987.          information on EBL.
  3988.  
  3989.          The BIOS keyboard buffer is limited to 15 characters.  The EBL
  3990.          provides a larger buffer for STACK's use.  [Note that various
  3991.          utilities and TSRs may provide a larger keyboard buffer.  If so,
  3992.          COM-AND will use the larger buffer.]
  3993.  
  3994.     STORE (DIAL!MACR!ACCE!DEFA!ALLOC) [parms]
  3995.  
  3996.          The STORE command writes a settings file (either the dialing
  3997.          directory, macro definition, accessory definition, defaults, or
  3998.          allocated variables).  Note that 'STORE DEFAULTS' is equivalent
  3999.          to 'UPDATE'.  Example:
  4000.  
  4001.          STORE DIAL              ; Update original dial dir
  4002.          STORE DEFAULT             ; Note: takes no file name
  4003.  
  4004.          The only STORE subcommand taking a parameter is STORE ALLOCATED.
  4005.          The other statements store to the file currently in use.  STORE
  4006.          ALLOCATED (storing allocated variables to a disk file) requires
  4007.          a specific file name for the store.
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014. Version 2.6: 900426
  4015.  
  4016. COM-AND: IBM PC Communication Script Language                 Page  69
  4017.  
  4018.  
  4019. V.    Script Language Commands (continued)
  4020.  
  4021.  
  4022.  ->    STRCAT Sx Sy
  4023.  
  4024.          The STRCAT statement concatenates two strings, Sy onto Sx.  The
  4025.          concatenation occurs after the last character of Sx.  Example:
  4026.  
  4027.  ->         STRCAT S0 S1         ; Concat S1 onto S0
  4028.          STRCAT S0 S1(5:10)      ; Extract substring of S1 and add
  4029.  
  4030.          Note that the command above is equivalent to the following:
  4031.  
  4032.          CONCAT S0 * S1         ; Another way to say this
  4033.  
  4034.  ->    STRCMP Sx Sy
  4035.  
  4036.          The STRCMP statement compares two strings (case sensitive) and
  4037.          sets the SUCCESS flag if they are identical.  Example:
  4038.  
  4039.  ->         STRCMP S0 S1         ; Compare strings in S0 & S1
  4040.  ->         IF SUCCESS          ; IF they are equal...
  4041.         ...             ; ...
  4042.  
  4043.          Note that STRCMP may also be used with IF as the conditional
  4044.          test (e.g. IF STRCMP S0 S1 ...).
  4045.  
  4046.  ->    STRCPY Sx <string>
  4047.  
  4048.          The STRCPY statement assigns the value in <string> to Sx.    It is
  4049.          equivalent to the ASSIGN statement.  Example:
  4050.  
  4051.  ->         STRCPY  S0 S1         ; S0 = S1, or ASSIGN S0 S1
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069. Version 2.6: 900426
  4070.  
  4071. COM-AND: IBM PC Communication Script Language                 Page  70
  4072.  
  4073.  
  4074. V.    Script Language Commands (continued)
  4075.  
  4076.  
  4077.  ->    STRFMT Sx <fmtstr> <parms>
  4078.  
  4079.          The STRFMT statement formats variables (and literals) into a
  4080.          template and places the result into a string variable.  The
  4081.          argument <fmtstr> above is the formatting template.  The
  4082.          argument list <parms> above is a list of variable names (and
  4083.          literals and substrings) to be formatted.    Example:
  4084.  
  4085.  ->         STRFMT S0 "The answer is %d %s" N1 S1
  4086.  
  4087.          In the above example, the value in N1 replaces %d and the text
  4088.          in S1 replaces %s.  Format specifiers in the template have the
  4089.          form:
  4090.  
  4091.              %[<flags>][<width>][.<precision>]<type>
  4092.  
  4093.          <Flags>         are "-" meaning left justify the argument and
  4094.                  "+" meaning display the argument with a plus
  4095.                  or minus sign (if numeric).  The defaults are
  4096.                  right justified and signed only if negative.
  4097.  
  4098.          <width>         specifies the minimum number of characters to
  4099.                  be displayed.  If <width> is greater than the
  4100.                  value, blanks are added to the left or right
  4101.                  (according to the justification).    If <width>
  4102.                  is prefixed by 0, 0's are used in place of
  4103.                  blanks.
  4104.  
  4105.          .<precision>    specifies the minimum number of digits to be
  4106.                  displayed.  0's are added to the left of the
  4107.                  formatted value to achieve <precision>.
  4108.  
  4109.          <type>         "d" specifies decimal numeric values (signed)
  4110.                  "u" specifies unsigned decimal values
  4111.                  "x" specifies hex values
  4112.                  "s" specifies string values
  4113.  
  4114.  
  4115.          The <fmtstr> is scanned from left to right for format
  4116.          specifiers.  As specifiers are found, parameters after <fmtstr>
  4117.          are extracted and used sequentially.  This usage is similar to
  4118.          the Microsoft "C" compiler's usage.
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124. Version 2.6: 900426
  4125.  
  4126. COM-AND: IBM PC Communication Script Language                 Page  71
  4127.  
  4128.  
  4129. V.    Script Language Commands (continued)
  4130.  
  4131.  
  4132.  ->    SUB Nx Ny Nz
  4133.  
  4134.          The SUB command performs the instruction:    Nz = Nx-Ny.  No error
  4135.          check is performed;  should the value exceed the range of a
  4136.          numeric variable, results are unpredictable.  Example:
  4137.  
  4138.  ->         SUB N1 N2 N3         ; N3 = N1-N2
  4139.  
  4140.          An expression may be used for Nx or Ny if it is entirely
  4141.          contained within parentheses.
  4142.  
  4143.     SUBDIR Sx
  4144.  
  4145.          The SUBDIR statement stores the current default drive:sub-
  4146.          directory into the target variable.  Example:
  4147.  
  4148.          SUBDIR S0             ; Get current drive:path
  4149.  
  4150.  ->    SUBSTR Sx Sy <number> <number>
  4151.  
  4152.          The SUBSTR statement extracts a substring from Sy and places it
  4153.          in Sx.  The beginning character position is specified by the
  4154.          first numeric argument (0,1,2...).  The second numeric argument
  4155.          specifies the length of the substring.  Example:
  4156.  
  4157.  ->         SUBSTR S0 S1 5 10          ; S0 = S1 at 5 for 10
  4158.  
  4159.          Note that the command above is equivalent to the following:
  4160.  
  4161.          S0 = S1(5:14)         ; Another way to say this
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179. Version 2.6: 900426
  4180.  
  4181. COM-AND: IBM PC Communication Script Language                 Page  72
  4182.  
  4183.  
  4184. V.    Script Language Commands (continued)
  4185.  
  4186.  
  4187.     SUSPEND FOR <number> <number>
  4188.  ->    SUSPEND UNTIL <number> <number>
  4189.  
  4190.          The SUSPEND FOR statement suspends COM-AND for the duration
  4191.          indicated (in military form).  The suspension may be up to 24
  4192.          hours.  The first argument is hours (0-23) and the second
  4193.          argument is minutes.  Example:
  4194.  
  4195.          SUSPEND FOR 0 30         ; Wait a-haffa hour
  4196.  
  4197.          The SUSPEND UNTIL statement suspends COM-AND until the time
  4198.          indicated (in military form).  Example:
  4199.  
  4200.  ->         SUSPEND UNTIL 4 30      ; 4:30 AM
  4201.  
  4202.          Incoming text received during SUSPEND is displayed on the
  4203.          screen.  Keystrokes are transmitted.  The SUSPEND may be
  4204.          terminated with the ESC key.  WHEN is active during SUSPEND.
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234. Version 2.6: 900426
  4235.  
  4236. COM-AND: IBM PC Communication Script Language                 Page  73
  4237.  
  4238.  
  4239. V.    Script Language Commands (continued)
  4240.  
  4241.  
  4242.  ->    SWITCH (Sx!Nx)
  4243.  
  4244.          The SWITCH statement declares a variable to be tested and a
  4245.          domain for transfer of control.  A SWITCH statement must be
  4246.          followed an ENDSWITCH statement.  Lines between the SWITCH and
  4247.          the ENDSWITCH statements are the domain of the SWITCH function.
  4248.  
  4249.          Within the SWITCH domain, CASE statements test the given
  4250.          variable for a value (not case sensitive).  If a match is
  4251.          obtained, the statements following the CASE statement are
  4252.          executed until an ENDCASE is encountered.
  4253.  
  4254.          A DEFAULT statement specifies a clause to be executed if none of
  4255.          the prior CASEs have been executed.  The DEFAULT clause is
  4256.          terminated by an ENDCASE;    just as a CASE statement.
  4257.  
  4258.          Schematically:
  4259.  
  4260.  ->         SWITCH (Sx!Nx)             ; Set variable to be tested.
  4261.            CASE (<string>!<number>)      ; Match Sx and <string>
  4262.            ...                 ; .. execute if a match
  4263.  ->           ENDCASE                 ; End of first case
  4264.  ->           CASE <string>             ; <String> = "_NULL" -> empty
  4265.            ...
  4266.  ->           ENDCASE                 ; End of second case
  4267.            ...
  4268.  ->           DEFAULT                 ; DEFAULT executed if no case
  4269.            ...                 ; .. was matched
  4270.  ->           ENDCASE                 ; End of default case
  4271.  ->           ENDSWITCH             ; End of SWITCH domain
  4272.  
  4273.          Statements between a SWITCH and an ENDSWITCH which are not
  4274.          themselves within a CASE/ENDCASE or DEFAULT/ENDCASE are ignored.
  4275.          SWITCH domains may be nested with IF domains, GOSUBs, DO, FOR
  4276.          and WHILE up to a maximum stack depth of 20.
  4277.  
  4278.          Note that either a string OR a numeric variable may be used
  4279.          with the SWITCH statement.  Strings and numerics may be
  4280.          mixed in any (useful) manner with SWITCH and CASEs.
  4281.  
  4282.          Substring bounds are not allowed on the SWITCH variable, but are
  4283.          allowed on the CASE variable.
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289. Version 2.6: 900426
  4290.  
  4291. COM-AND: IBM PC Communication Script Language                 Page  74
  4292.  
  4293.  
  4294. V.    Script Language Commands (continued)
  4295.  
  4296.  
  4297.     Sx = <expression>
  4298.  
  4299.          String expressions may be computed and assigned directly with
  4300.          the syntax "Sx = <expression>".  <Expression> is any legitimate
  4301.          combination of values and operators.  For example:
  4302.  
  4303.          S0 = S1 & S2 * S3(4:5)
  4304.          S0(70:79) = S1
  4305.  
  4306.          Values may be literal or string/numeric variables.  Operators
  4307.          allowed are "*" (concatenate at end), and "&" (trim trailing
  4308.          blanks and then concatenate).  Substrings may be specified using
  4309.          (from:to) notation:  from column # to column #.
  4310.  
  4311.          Numeric variables may also be included.  An implicit ITOA will
  4312.          be performed (leading zeroes suppressed and left justified).
  4313.          The width of the value is exactly the width of the value so
  4314.          formatted.
  4315.  
  4316.          This usage, string expression, is the only statement in the
  4317.          COM-AND script language that supports 'string deposit'...  i.e.
  4318.          specification of a substring for assignment.  I hope that a
  4319.          future extension of this script language will allow string
  4320.          deposit as freely as string extraction.
  4321.  
  4322.          String variables may also be 'indexed'.  For example, S0[1] is
  4323.          S1, S1[1] is S2, and so on.  Arithmetic expressions are allowed
  4324.          as indices.  Indices may be used on either side of a store (e.g.
  4325.          "N0[N1] = N2[N3]").  An index does not 'wrap' (i.e.  N0[-1] is
  4326.          N0, not N99).  For example:
  4327.  
  4328.          S0 = S0[2](2:3) ; Extract cols 2-3 from S2 and place in S0
  4329.  
  4330.  ->    TERMINAL
  4331.  
  4332.          The TERMINAL statement terminates a COM-AND script, returning to
  4333.          CRT mode.    It may be coded at any level (for example within a
  4334.          subroutine reached through a call from a subroutine).  Example:
  4335.  
  4336.  ->         TERMINAL             ; End of script
  4337.          ; Nothing past this point in the script is executed
  4338.  
  4339.          Note also the EXIT and CONNECT command.
  4340.  
  4341.  
  4342.  
  4343.  
  4344. Version 2.6: 900426
  4345.  
  4346. COM-AND: IBM PC Communication Script Language                 Page  75
  4347.  
  4348.  
  4349. V.    Script Language Commands (continued)
  4350.  
  4351.  
  4352.  ->    TIME Sx [0!1]
  4353.  
  4354.          The TIME statement store the current system time into the target
  4355.          variable.    The TIME is formatted according to the optional
  4356.          format argument (if provided and nonzero, the time is formatted
  4357.          hh:mm:ss where hh is 0-23; otherwise it is formatted hh:mm:ss
  4358.          with a final AM or PM).  Example:
  4359.  
  4360.  ->         TIME S1 1             ; Get the time of day military fmt
  4361.  
  4362.  ->    TRACE (ON!OFF)
  4363.  
  4364.          The TRACE statement turns on and off script file tracing.    When
  4365.          tracing is enabled, each line of the script file is displayed on
  4366.          the CRT before the statement is executed.    If logging is
  4367.          enabled, the trace display is also copied to the log.  Example:
  4368.  
  4369.  ->         TRACE ON             ; Turn on tracing
  4370.  
  4371.  ->    TRANSMIT <string>
  4372.  
  4373.          The TRANSMIT statement writes the given string to the commun-
  4374.          ications line.  TRANSMIT does not add a carriage return to the
  4375.          string;  if a carriage return is required, it should be
  4376.          contained in the string (^M is a carriage return).  TRANSMIT
  4377.          backscans the text to be transmitted and does not send trailing
  4378.          blanks.  Examples:
  4379.  
  4380.  ->         TRANSMIT S0         ; Send what's in S0
  4381.  ->         TRANSMIT "text"         ; Send text without a c/r
  4382.  ->         TRANSMIT "text^M"       ; Send text with a c/r
  4383.  
  4384.          Note: To be compatible with PCPlus, a tilde (~) represents
  4385.          a 1/2 second pause in the TRANSMIT string.
  4386.  
  4387.     TSINCE [(#)] Nx Ny Nz
  4388.  
  4389.          The TSINCE statement reads the time since a given timer was set
  4390.          (all timers are initialized to the time the script is loaded but
  4391.          may be changed with "SET TIMER"), in hours, minutes and seconds.
  4392.          10 timers are supported.  Example:
  4393.  
  4394.          TSINCE N0,N1,N2         ; Read time since timer 0 was set
  4395.          TSINCE (9) N0,N1,N2     ; Read time since timer 9 was set
  4396.  
  4397.  
  4398.  
  4399. Version 2.6: 900426
  4400.  
  4401. COM-AND: IBM PC Communication Script Language                 Page  76
  4402.  
  4403.  
  4404. V.    Script Language Commands (continued)
  4405.  
  4406.  
  4407.  ->    TYPE <string>
  4408.  
  4409.          The TYPE statement opens the file specified by <string> and
  4410.          displays it to the local console.    This is equivalent to the
  4411.          interactive Alt-W command of COM-AND.  Example:
  4412.  
  4413.  ->         TYPE "COM-AND.DOC"      ; Don't do this:  too big!
  4414.  
  4415.     UNTIL <condition>
  4416.  
  4417.          The UNTIL statement terminates the clause of a DO loop.  The
  4418.          specified condition is evaluated, and looping occurs if the
  4419.          evaluation is false.  Refer to DO above for an example.
  4420.  
  4421.          The <condition> executed by UNTIL has the same form as the
  4422.          condition of the 'IF' statement.
  4423.  
  4424.     UPPER Sx
  4425.  
  4426.          The UPPER statement upper cases all alphabetic characters in Sx.
  4427.          Example:
  4428.  
  4429.          UPPER S5             ; Force all upper case
  4430.  
  4431.     VERSION Nx
  4432.  
  4433.          The VERSION statement reads the current version of COM-AND
  4434.          (major*10+minor) and places it into a numeric variable.
  4435.          Example:
  4436.  
  4437.          VERSION N0          ; N0 = 23 if version 2.3
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454. Version 2.6: 900426
  4455.  
  4456. COM-AND: IBM PC Communication Script Language                 Page  77
  4457.  
  4458.  
  4459. V.    Script Language Commands (continued)
  4460.  
  4461.  
  4462.  ->    WAITFOR <string> [<number>]
  4463.  
  4464.          The WAITFOR instruction waits up to given (explicit in <number>,
  4465.          or default) number of seconds for a the target string to be
  4466.          received.    The WAITFOR instruction sets the WAITFOR condition
  4467.          (tested by IF) according to whether or not the target <string>
  4468.          was received.  The WAITFOR function is not case sensitive.
  4469.          Example:
  4470.  
  4471.  ->         WAITFOR "U#="           ; Waitfor GEnie user # prompt
  4472.  
  4473.          Note:  As with WHEN strings, carriage returns, line feeds, and
  4474.          backspaces should not be encoded in the WAITFOR target.  A
  4475.          special provision has been made for the construct:
  4476.  
  4477.  ->         WAITFOR "^M"            ; Waitfor the next carriage return
  4478.  
  4479.          This was required because of the frequency with which scripts
  4480.          that have been published use the construct.  However, in the
  4481.          general case, avoid carriage returns, line feeds and back-
  4482.          spaces in the WAITFOR string.
  4483.  
  4484.     WCLOSE
  4485.  
  4486.          The WCLOSE instruction closes a window opened with the WOPEN
  4487.          instruction.  If no windows are open FAILURE is set.  Otherwise,
  4488.          (1) The saved area (if one was saved) is restored and (2) The ON
  4489.          ESCAPE condition at the time of the WOPEN is restored.  Example:
  4490.  
  4491.          WCLOSE             ; Must match a WOPEN above
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504.  
  4505.  
  4506.  
  4507.  
  4508.  
  4509. Version 2.6: 900426
  4510.  
  4511. COM-AND: IBM PC Communication Script Language                 Page  78
  4512.  
  4513.  
  4514. V.    Script Language Commands (continued)
  4515.  
  4516.  
  4517.  ->    WHEN [(#)] <string> <string>
  4518.  
  4519.          The WHEN instruction establishes a 'trigger' condition which
  4520.          will be recognized and responded to automatically.  WHEN has two
  4521.          arguments:  the first argument is a <string> which, when
  4522.          received will result in the transmission of the second string.
  4523.          Example:
  4524.  
  4525.  ->         WHEN "Press return for more" "^M" ; Respond w/c/r
  4526.  
  4527.          The WHEN statement has been extended to allow up to 10 WHEN
  4528.          settings (WHEN (0), WHEN (1) ...  WHEN (9), with an unqual-
  4529.          ified WHEN equivalent to WHEN (0)).  Each must be set and
  4530.          cleared individually.  Examples:
  4531.  
  4532.          WHEN (0) "more?" "^M"   ; Same as WHEN
  4533.          WHEN (9) "Agree?" "Y^M" ; Set last WHEN
  4534.  
  4535.          WHEN trigger strings are not case sensitive;  you needn't
  4536.          represent the trigger exactly.  The WHEN matching begins after
  4537.          receipt of a carriage return, and continues until the length
  4538.          bufferred exceeds that of the WHEN string.
  4539.  
  4540.          Note:  The SET ANYWHEN statement affects the type of match
  4541.          performed by the WHEN statement.  When ANYWHEN is off (the
  4542.          default), a match must be made from the start a received line
  4543.          (i.e.  immediately after the return).  When ANYWHEN is on, the
  4544.          match is a substring test against the entire received buffer.
  4545.  
  4546.          If WHEN triggers are to be used during an RGET, the length of
  4547.          the RGET target must be larger than the largest WHEN trigger
  4548.          string.
  4549.  
  4550.          Carriage returns and line feeds cannot be included in a WHEN
  4551.          trigger string.
  4552.  
  4553.          WHEN settings are cleared with the CWHEN statement.
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564. Version 2.6: 900426
  4565.  
  4566. COM-AND: IBM PC Communication Script Language                 Page  79
  4567.  
  4568.  
  4569. V.    Script Language Commands (continued)
  4570.  
  4571.  
  4572.     WHILE <condition>
  4573.  
  4574.          The WHILE statement asserts the beginning of a loop, if the
  4575.          condition specified evaluates true.  The clause after the WHILE
  4576.          statement is executed through an ENDWHILE statement and looping
  4577.          occurs (back to evaluate the condition again).
  4578.  
  4579.          The WHILE statement evaluates the given condition (see the 'IF'
  4580.          statement for a list of conditions).  If the evaluation is
  4581.          false, statements following are skipped until the corresponding
  4582.          ENDWHILE is encountered.  Example:
  4583.  
  4584.          N0 = 0             ; Initialize index
  4585.          WHILE LT N0 10         ; Loop for 10 times
  4586.          N0 = N0+1         ; Increment index
  4587.          ...
  4588.          ENDWHILE         ; Loop back to WHILE
  4589.  
  4590.  
  4591.          Note: (1) GOTO statements may never enter a WHILE loop;  even
  4592.                to leave an inner loop to return to an outer loop.
  4593.  
  4594.          Note: (2) WHILE statements may be nested (along with IF, FOR,
  4595.                WHILE, SWITCH and DO loops) up to 20 levels.  How-
  4596.                ever, they may not overlap other WHILE loops, or
  4597.                other flow-of-control statements.
  4598.  
  4599.          Note: (3) The clause of the WHILE statement (statements after
  4600.                'WHILE' down to the ENDWHILE statement) is not
  4601.                necessarily executed, even once.  The conditional
  4602.                evaluation is performed before each iteration.
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619. Version 2.6: 900426
  4620.  
  4621. COM-AND: IBM PC Communication Script Language                 Page  80
  4622.  
  4623.  
  4624. V.    Script Language Commands (continued)
  4625.  
  4626.  
  4627.     WOPEN row col row col attr [label]
  4628.  
  4629.          The WOPEN command opens a window on the screen, saving the
  4630.          current ON ESCAPE setting, and optionally, setting a new ON
  4631.          ESCAPE condition.    Up to 10 windows may be opened at one time
  4632.          (if 10 is exceeded, FAILURE is set).
  4633.  
  4634.          The WOPEN instruction combines a number of other instructions
  4635.          into a one function.  WOPEN is equivalent to:
  4636.  
  4637.              Sx = "_ONESCAPE"                ; Read current
  4638.              ON ESCAPE GOSUB label         ; Set new
  4639.              CURSOR Nx Ny             ; Read current & save
  4640.              SAVE row col row col         ; Save screen area
  4641.  ->             BOX  row col row col attr         ; Clear scr, draw box
  4642.  
  4643.          The corresponding WCLOSE is equivalent to:
  4644.  
  4645.              ON ESCAPE GOSUB Sx          ; Reset condition
  4646.              RESTORE                 ; Restore screen
  4647.  ->             LOCATE Nx Ny             ; Restore cursor
  4648.  
  4649.          The ON ESCAPE condition is reset upon WCLOSE to the setting at
  4650.          the time of the WOPEN.  Intervening "ON ESCAPE" statements are
  4651.          therefore cancelled.  Intervening SAVEs and RESTOREs are not
  4652.          cancelled, however.  Have care!
  4653.  
  4654.          Example:
  4655.  
  4656.          WOPEN 10,10 20,70 (default) ESCAPE_Label ; Open a window
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674. Version 2.6: 900426
  4675.  
  4676. COM-AND: IBM PC Communication Script Language                 Page  81
  4677.  
  4678.  
  4679. V.    Script Language Commands (continued)
  4680.  
  4681.  
  4682.     WRITE Sx [Nx]
  4683.  
  4684.          The WRITE command writes a string from a string variable to the
  4685.          output file.  The length of the string variable is specified by
  4686.          Nx.  The output file must be opened by a previous FOPENO.
  4687.  
  4688.          In TEXT mode the WRITE command translates CRs in the string
  4689.          buffer to CR/LF pairs.  No tab compression is performed.
  4690.  
  4691.          WRITE writes up to 80 characters from Sx, according to the value
  4692.          in Nx.  Example:
  4693.  
  4694.          WRITE S0 75         ; Write 75 bytes
  4695.  
  4696.          Note that the length given applies to the string as given.  The
  4697.          string "^M" is 2 characters long and should be specified as a
  4698.          length of 2, although only 1 character (control-M) will be
  4699.          written.  The string "`"", interestingly enough, is 1 character
  4700.          long!
  4701.  
  4702.          Note that the length parameter is optional.  If not specified,
  4703.          the current length of the variable will be computed.
  4704.  
  4705.          Note that COM-AND does not write a ^Z (decimal 26) to the output
  4706.          file when it is closed, having been opened in TEXT mode.  The
  4707.          script author may add the ASCII EOF convention by preceding the
  4708.          FCLOSEO with the statement:
  4709.  
  4710.          WRITE "^Z"              ; ASCII EOF convention
  4711.  
  4712.          Note also: FPUTC/FPUTS/FWRITE commands.
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729. Version 2.6: 900426
  4730.  
  4731. COM-AND: IBM PC Communication Script Language                 Page  82
  4732.  
  4733.  
  4734. VI.    SET commands
  4735.  
  4736.  
  4737.     SET subcommands allow string variables for their operands.  For
  4738.     example, ON or OFF may be contained in a string, and the string
  4739.     used as the final operand of the statement.
  4740.  
  4741.  
  4742.     A. Basic set
  4743.  
  4744.        SET 25
  4745.  
  4746.         SET 25 turns on CGA mode (25 lines), for CGA/Monochrome.
  4747.         NOTE: SET 25 clears any DWINDOW in effect.
  4748.  
  4749.        SET 43
  4750.  
  4751.         SET 43 turns on EGA mode (43 lines), if an EGA is available.
  4752.         [SET 43 sets VGA (50 lines), if VGA is available.]
  4753.         NOTE: SET 43 clears any DWINDOW in effect.
  4754.  
  4755.        SET ACCESSORY NAME # <string>
  4756.        SET ACCESSORY SUBD # <string>
  4757.        SET ACCESSORY PGM  # <string>
  4758.        SET ACCESSORY SCRI # <string>
  4759.  
  4760.            SET ACCE <field> stores the given string into the stated
  4761.            field (name, subdir, ...).  Each field is differently sized.
  4762.            Accessory directory entry numbers range from 1-50.
  4763.  
  4764.        SET ADVERT (ON!OFF)
  4765.  
  4766.         SET ADVERT sets and resets the initial advertisement display.
  4767.  
  4768.  ->       SET ALARM (ON!OFF)
  4769.  
  4770.         SET ALARM sets and resets the alarm function.  When OFF,
  4771.         the alarm does not sound (e.g. after download),but a delay,
  4772.         for a period set through Alt-S or SET ATIME, is performed.
  4773.  
  4774.        SET ANYWHEN (ON!OFF)
  4775.  
  4776.         SET ANYWHEN controls the execution of any current WHEN condi-
  4777.         tions.    When ANYWHEN is off (the default), matching occurs
  4778.         from the beginning of the buffer.  When ANYWHEN is on, the
  4779.         match is actually a substring match to the received buffer.
  4780.  
  4781.  
  4782.  
  4783.  
  4784. Version 2.6: 900426
  4785.  
  4786. COM-AND: IBM PC Communication Script Language                 Page  83
  4787.  
  4788.  
  4789. VI.    SET Commands (continued)
  4790.  
  4791.  
  4792.     A. Basic set (continued)
  4793.  
  4794.  ->       SET ASCII <subcommand>
  4795.  
  4796.         The SET ASCII subcommands are discussed below (section "VI").
  4797.  
  4798.  ->       SET ATIME <number>         Alarm time
  4799.  
  4800.         SET ATIME sets the duration (in seconds) of the alarm.
  4801.  
  4802.  ->       SET BACKSPACE IN (NONDESTRUC!DESTRUC)
  4803.  
  4804.         SET BACKSPACE IN controls the function performed when a
  4805.         backspace is received.    Nondestructive backspaces are not
  4806.         common, but may be needed occasionally.
  4807.  
  4808.  ->       SET BACKSPACE OUT (BACKSPACE!DELETE)
  4809.  
  4810.         SET BACKSPACE OUT controls the function performed when a
  4811.         backspace is typed.  Either a 'backspace' character (0x8)
  4812.         or a delete character (0x7f) may be transmitted.
  4813.  
  4814.        SET BAR <attr>
  4815.  
  4816.         SET BAR sets the status line bar color.  The change takes
  4817.         effect the next time the status line is updated (e.g. with
  4818.         the LEGEND command).  The new color holds after the script.
  4819.  
  4820.  ->       SET BAUDRATE (300!1200!2400!4800!9600!19K!38K!56K!115K)
  4821.  
  4822.         SET BAUD sets the communications port linespeed.  This
  4823.         command results in a reset of the line.
  4824.  
  4825.        SET BELL <number>
  4826.  
  4827.         SET BELL sets the bell tone in hertz.
  4828.  
  4829.        SET BKSCREEN <number>
  4830.  
  4831.         SET BELL sets backscreen size in pages (0-64).    Note that
  4832.         this function clears the current backscreen in the process.
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839. Version 2.6: 900426
  4840.  
  4841. COM-AND: IBM PC Communication Script Language                 Page  84
  4842.  
  4843.  
  4844. VI.    SET Commands (continued)
  4845.  
  4846.  
  4847.     A. Basic set (continued)
  4848.  
  4849.  ->       SET BREAK <number>
  4850.  
  4851.         SET BREAK sets the duration (in milliseconds) of the break
  4852.         signal (BREAK statement or Ctrl-end).
  4853.  
  4854.        SET BSUPPRESS (ON!OFF)
  4855.  
  4856.         SET BSUPPRESS sets and resets blank line suppression as
  4857.         implemented in COM-AND.
  4858.  
  4859.        SET CALLLOG (ON!OFF)
  4860.  
  4861.         SET CALLLOG sets and resets COM-AND's call logging.  The
  4862.         calllog records DIAL (Alt-D), REDIAL (Alt-R), HANGUP
  4863.         (Alt-H), and file transfers (PgUp and PgDn).
  4864.  
  4865.        SET CDISPLAY (ON!OFF)
  4866.  
  4867.         SET CDISPLAY turns on and off control character display.
  4868.         BBS's often use control characters as graphics, and network
  4869.         host systems only generate them inadvertantly.
  4870.  
  4871.        SET CDRESPECT (ON!OFF)
  4872.  
  4873.         SET CDRESPECT sets and resets COM-AND's treatment of the
  4874.         modem carrier detect.  When CD respect is 'off', COM-AND
  4875.         treats modem carrier as always 'true'.
  4876.  
  4877.        SET CHAT (ON!OFF)
  4878.  
  4879.         SET CHAT turns on and off chat mode.
  4880.  
  4881.        SET CHLINES <number>
  4882.  
  4883.         SET CHLINES specifies the size of the CHAT window.
  4884.  
  4885.        SET CLOCK (ON!OFF!NEW)
  4886.  
  4887.         SET CLOCK turns on and off the on-screen clock.  The "NEW"
  4888.         subcommands resets the "call time" and makes an entry in
  4889.         the calllog (if calllogging).
  4890.  
  4891.  
  4892.  
  4893.  
  4894. Version 2.6: 900426
  4895.  
  4896. COM-AND: IBM PC Communication Script Language                 Page  85
  4897.  
  4898.  
  4899. VI.    SET Commands (continued)
  4900.  
  4901.  
  4902.     A. Basic set (continued)
  4903.  
  4904.        SET COLOR (ON!OFF)
  4905.  
  4906.         SET COLOR sets/reset COM-AND's use of a color monitor, if
  4907.         available.  Note the screen is repainted accordingly.
  4908.  
  4909.        SET COMBASE <port> Nx
  4910.  
  4911.         SET COMBASE specifies the base address to be used for the
  4912.         given port (COM1, COM2, etc).
  4913.  
  4914.        SET COMVECTOR <port> Nx
  4915.  
  4916.         SET COMVECTOR specifies the vector number to be used for the
  4917.         given port (COM1, COM2, etc).
  4918.  
  4919.  ->       SET CR (CR!CR_LF)
  4920.  
  4921.         SET CR controls the display of received carriage returns.
  4922.         When set to CR_LF, received carriage returns are displayed
  4923.         as carriage return/line feeds.
  4924.  
  4925.  ->       SET CR_IN (CR!CR_LF)
  4926.  
  4927.         SET CR_IN is equivalent to SET CR above.
  4928.  
  4929.  ->       SET DATABITS (7!8)
  4930.  
  4931.         SET DATA sets the communications port to 7 or 8 data bits
  4932.         (this does not affect XMODEM, WXMODEM, or YMODEM transfers).
  4933.  
  4934.        SET DBLCLICK #
  4935.  
  4936.         SET DBLCLICK specifies the interval (in MS) during which a
  4937.         double click of the mouse button may occur.
  4938.  
  4939.        SET DEFAULT <attr>
  4940.  
  4941.         SET DEFA sets the color for menu windows.  The change takes
  4942.         effect the next time a window is invoked (e.g. with an alt'd
  4943.         key).  The new color holds after the script terminates.
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949. Version 2.6: 900426
  4950.  
  4951. COM-AND: IBM PC Communication Script Language                 Page  86
  4952.  
  4953.  
  4954. VI.    SET Commands (continued)
  4955.  
  4956.  
  4957.     A. Basic set (continued)
  4958.  
  4959.        SET DIAL NAME # <string>
  4960.        SET DIAL NUMB # <string>
  4961.        SET DIAL RATE # <string>
  4962.        SET DIAL PARI # <string>
  4963.        SET DIAL DATA # <string>
  4964.        SET DIAL STOP # <string>
  4965.        SET DIAL SCRI # <string>
  4966.  
  4967.            SET DIAL <field> stores the given string into the stated
  4968.            field (name, number, ...).  Each field is differently sized.
  4969.            Dialing directory entry numbers range from 1-100.
  4970.  
  4971.  ->       SET DISPLAY (ON!OFF)
  4972.  
  4973.         SET DISPLAY sets and resets the display of received char-
  4974.         acters.  You may use this to suppress (OFF) received text
  4975.         while you wait for an appropriate response.
  4976.  
  4977.  ->       SET DLDIR <string>
  4978.  
  4979.         SET DLDIR establishes a default path for downloaded files
  4980.         when the file name given is not pathed.
  4981.  
  4982.         The <string> provided may be of the form: d:\path...\path
  4983.  
  4984.        SET DOSLEVEL <number>
  4985.  
  4986.         SET DOSLEVEL establishes an error level (default 0) to be
  4987.         returned to the invoking program when COM-AND terminates.
  4988.         Among other things, this provides a means to exit COM-AND
  4989.         but retain control of processing (via a batch file).
  4990.  
  4991.        SET DPREFIX <string>
  4992.  
  4993.         SET DPREFIX specifies the prefix used to build a dialing
  4994.         command.
  4995.  
  4996.        SET DROPDTR (ON!OFF)
  4997.  
  4998.         SET DROPDTR specifies method used (issue modem escape+hangup
  4999.         string, or drop DTR) to hangup.
  5000.  
  5001.  
  5002.  
  5003.  
  5004. Version 2.6: 900426
  5005.  
  5006. COM-AND: IBM PC Communication Script Language                 Page  87
  5007.  
  5008.  
  5009. VI.    SET Commands (continued)
  5010.  
  5011.  
  5012.     A. Basic set (continued)
  5013.  
  5014.        SET DSUFFIX <string>
  5015.  
  5016.         SET DSUFFIX specifies the suffix used to build a dialing
  5017.         command.
  5018.  
  5019.        SET DTR (ON!OFF)
  5020.  
  5021.         SET DTR raises and lowers the DTR signal to the modem.
  5022.  
  5023.  ->       SET DUPLEX (HALF!FULL)
  5024.  
  5025.         SET DUPLEX turns on (HALF) and off (FULL) local echo.
  5026.  
  5027.  ->       SET ENQ (OFF!CISB)
  5028.  
  5029.         SET ENQ CISB allows automatic file transfers initiated by
  5030.         CIS.  SET ENQ OFF ignores ENQ characters.
  5031.  
  5032.        SET EXIT <script name>
  5033.  
  5034.         SET EXIT specifies a script file name to be invoked upon
  5035.         termination of COM-AND.  Termination occurs manually with
  5036.         Alt-X, or through the script command BYE.  When terminated
  5037.         and an EXIT script has been set, COM-AND invokes the script,
  5038.         after testing for carrier.  When an EXIT script is set, the
  5039.         only way to terminate COM-AND is through the script itself.
  5040.         i.e.  no EXIT script is specified in the EXIT script, and
  5041.         the EXIT script performs a BYE command.
  5042.  
  5043.         Note that the EXIT script function is cleared when it is
  5044.         invoked...  i.e.  an EXIT script must re-specify an EXIT
  5045.         script name if the function is to be preserved (and COM-AND
  5046.         not to terminate).
  5047.  
  5048.         Note that COM-AND must be ABLE to find the EXIT script on
  5049.         termination.  It is best if all EXIT scripts reside in the
  5050.         COM-AND= environment variable pointed subdirectory.
  5051.  
  5052.        SET EXQUERY (ON!OFF)
  5053.  
  5054.         SET EXQUERY sets/resets the query-on-exit function.
  5055.  
  5056.  
  5057.  
  5058.  
  5059. Version 2.6: 900426
  5060.  
  5061. COM-AND: IBM PC Communication Script Language                 Page  88
  5062.  
  5063.  
  5064. VI.    SET Commands (continued)
  5065.  
  5066.  
  5067.     A. Basic set (continued)
  5068.  
  5069.        SET FAILURE (ON!OFF)
  5070.  
  5071.         SET FAILURE sets and resets the FAILURE condition tested by
  5072.         the IF statement.  SET FAILURE may be used to modify various
  5073.         conditions setting and resetting SUCCESS/FAILURE.
  5074.  
  5075.        SET FLAG [(#)] (ON!OFF)
  5076.  
  5077.         The SET FLAG instruction sets and resets one of 10 flags.
  5078.         Flags may be tested with the IF statement.
  5079.  
  5080.  ->       SET FLOWCTRL (ON!OFF)
  5081.  
  5082.         SET FLOWCTRL turns on and off software flow control used
  5083.         during receipt of text from the host.  This command is global
  5084.         (SET ASCII FLOW is local to ASCII SENDs), affecting both
  5085.         display receipt and ASCII sends.
  5086.  
  5087.        SET FOUND (ON!OFF)
  5088.  
  5089.         SET FOUND sets and resets the FOUND condition tested by
  5090.         the IF statement.  SET FOUND may be used to imitate FIND
  5091.         statement returns.
  5092.  
  5093.  ->       SET HARDFLOW (ON!OFF)
  5094.  
  5095.         SET HARD enables and disables hardware flow control.  Flow
  5096.         control is performed at the hardware level by raising RTS
  5097.         and waiting (for up to 20 seconds) for CTS.  Note that HARD-
  5098.         FLOW is overridden by RTSFLOW (below).
  5099.  
  5100.        SET HMOUSE #
  5101.  
  5102.         SET HMOUSE specifies the mouse horizontal sensitivity.
  5103.  
  5104.        SET INAFTER (ON!OFF)
  5105.  
  5106.         SET INAFTER turns on and off modem initialization after
  5107.         hangup.
  5108.  
  5109.        SET KBDBUFFER (ON!OFF)
  5110.  
  5111.         SET KBDBUF turns on and off the keyboard display buffer.
  5112.  
  5113.  
  5114. Version 2.6: 900426
  5115.  
  5116. COM-AND: IBM PC Communication Script Language                 Page  89
  5117.  
  5118.  
  5119. VI.    SET Commands (continued)
  5120.  
  5121.  
  5122.     A. Basic set (continued)
  5123.  
  5124.  ->       SET KERMIT <subcommand>
  5125.  
  5126.         The SET KERMIT subcommands are discussed below ("VI").
  5127.  
  5128.        SET LD # <string>
  5129.  
  5130.            SET LD stores the given string into the given LD directory
  5131.            entry:  1,2,3, or 4 is required, 1="+",2="-",3="#",4="@" in
  5132.            the Alt-D LD directory.
  5133.  
  5134.        SET LINKED (ON!OFF)
  5135.  
  5136.         SET LINKED sets and resets the LINKED condition tested by
  5137.         the IF statement.  SET LINKED may be used to imitate script
  5138.         execution through Alt-D.
  5139.  
  5140.        SET MACRO # <string>
  5141.  
  5142.            SET MACRO stores the given string into the given MACRO dir-
  5143.            ectory entry:  0-9.
  5144.  
  5145.        SET MASK (ON!OFF)
  5146.  
  5147.         SET MASK sets and resets the 7 bit mask of COM-AND.
  5148.  
  5149.        SET MCONNECT <string>
  5150.  
  5151.         SET MCONNECT specifies the modem connect string used to
  5152.         recognize a successful dialing function.
  5153.  
  5154.        SET MDCHAR <value>
  5155.  
  5156.         SET MDCHAR sets an alternate modem delay character used
  5157.         as 1/2 second delays in TRANSMIT and in modem strings. Note
  5158.         that this value is retained after the script terminates.
  5159.  
  5160.        SET MDELAY #
  5161.  
  5162.         SET MDELAY specifies the intercharacter time (in MS) for
  5163.         strings issued to the modem (e.g. dialing strings).
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169. Version 2.6: 900426
  5170.  
  5171. COM-AND: IBM PC Communication Script Language                 Page  90
  5172.  
  5173.  
  5174. VI.    SET Commands (continued)
  5175.  
  5176.  
  5177.     A. Basic set (continued)
  5178.  
  5179.  ->       SET MENUMODE (ON!OFF)
  5180.  
  5181.         SET MENUMODE specifies the new MENUMODE value.    It takes
  5182.         effect only upon completion of the script.
  5183.  
  5184.        SET MESCAPE <string>
  5185.  
  5186.         SET MESCAPE specifies the string to be used to get the
  5187.         attention of the modem (e.g. before hangup).
  5188.  
  5189.        SET MHANGUP <string>
  5190.  
  5191.         SET MHANGUP specifies the string used (if DROPDTR is OFF)
  5192.         to hangup the phone.
  5193.  
  5194.        SET MINIT <string>
  5195.  
  5196.         SET MINIT specifies the string transmitted to the modem
  5197.         when COM-AND is loaded.
  5198.  
  5199.        SET MUSIC (ON!OFF)
  5200.  
  5201.         SET MUSIC sets and resets COM-AND's processing of music
  5202.         escape sequences.  Music escape sequences are received:
  5203.         "ESC [ M <string> <control-N>'.
  5204.  
  5205.  ->       SET PARITY (EVEN!ODD!NONE)
  5206.  
  5207.         SET PARITY sets the communications line parity.
  5208.  
  5209.        SET PCJR (ON!OFF)
  5210.  
  5211.         SET PCJr sets and resets a PCJr mode, which suspends the
  5212.         comm line during disk I/O.  This only effects transcripts,
  5213.         Windowed XMODEM and Windowed Kermit.
  5214.  
  5215.  ->       SET PORT (COM1!COM2!COM3!COM4)
  5216.  
  5217.         SET PORT declares the communications port to be used.
  5218.         This command resets the communications line.
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224. Version 2.6: 900426
  5225.  
  5226. COM-AND: IBM PC Communication Script Language                 Page  91
  5227.  
  5228.  
  5229. VI.    SET Commands (continued)
  5230.  
  5231.  
  5232.     A. Basic set (continued)
  5233.  
  5234.        SET QUIET (ON!OFF)
  5235.  
  5236.         SET QUIET turns on and off bell character suppression.
  5237.  
  5238.  ->       SET RDELAY <number>
  5239.  
  5240.         SET RDELAY sets the duration (in seconds) of the delay
  5241.         between Alt-R and script DIAL statement redial attempts.
  5242.  
  5243.        SET RDISPLAY (ON!OFF)
  5244.  
  5245.         SET RDISPLAY sets and resets the display of received char-
  5246.         acters.  You may use this to suppress (OFF) received text
  5247.         while you wait for an appropriate response.
  5248.  
  5249.        SET RDMAX <number>
  5250.  
  5251.         A script author may set a limit to the number of redials per-
  5252.         formed through a DIAL statement.  This feature is available
  5253.         only through scripts.  The value is not retained across mul-
  5254.         tiple scripts at this time, either.
  5255.  
  5256.        SET RECHO (ON!OFF)
  5257.  
  5258.         SET RECHO sets and resets the echo of received characters.
  5259.         This might be enabled (ON), for example, in a script that
  5260.         performed a 'HOST' mode for outside callers.
  5261.  
  5262.  ->       SET REMOTE (ON!OFF)
  5263.  
  5264.         SET REMOTE enables (on) and disables (off) the ability to
  5265.         execute script functions through received commands.  REMOTE
  5266.         commands are received: "ESC,^,<script command> <cr>".
  5267.  
  5268.        SET RLEOK (ON!OFF)
  5269.  
  5270.         SET RLEOK sets and resets the possibility of RLE display
  5271.         during normal receive functions.
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279. Version 2.6: 900426
  5280.  
  5281. COM-AND: IBM PC Communication Script Language                 Page  92
  5282.  
  5283.  
  5284. VI.    SET Commands (continued)
  5285.  
  5286.  
  5287.     A. Basic set (continued)
  5288.  
  5289.        SET RMODE (ASCII!BINARY)
  5290.  
  5291.         SET RMODE affects the RGET command subsequent.    By default,
  5292.         the RMODE setting is ASCII.  When set to ASCII, RGETs ignore
  5293.         nulls and line feeds, end on a carriage return (or length),
  5294.         and backspace/rubouts are implemented (and not bufferred).
  5295.         When the mode is binary, nulls, carriage returns, line feeds,
  5296.         backspaces and rubouts are bufferred.
  5297.  
  5298.        SET RTS (ON!OFF)
  5299.  
  5300.         SET RTS sets and resets request-to-send bit of the modem.
  5301.         Generally, this capability should be avoided.
  5302.  
  5303.        SET RTSD (ON!OFF)
  5304.  
  5305.         SET RTSD enables (on) and disables (off) RTS Discipline
  5306.         in COM-AND.  When enabled, RTS is raised before every write
  5307.         and lowered after.  When disabled, RTS is not lowered, and
  5308.         the script controls RTS (via SET RTS above).
  5309.  
  5310.        SET RTSF (ON!OFF)
  5311.  
  5312.         SET RTSF enables (on) and disables (off) RTS flow control.
  5313.         When RTS flow control is enabled the RTS line is used to
  5314.         signal the modem that COM-AND is able (or not able) to re-
  5315.         ceive characters.  This method of flow control is required by
  5316.         some (very new) modems.  Refer to Appendix J for discussion.
  5317.  
  5318.        SET SILENCE <seconds>
  5319.  
  5320.         SET SILENCE sets and resets the timeout used by ON SILENCE
  5321.         GOSUB.    The trap defaults to 300 seconds.  Note that SET
  5322.         SILENCE changes only the timeout, not the trap clock.
  5323.  
  5324.        SET SLOWOUT (ON!OFF)
  5325.  
  5326.         SET SLOWOUT sets and resets 'slow output' during file trans-
  5327.         fers.  COM-AND usually performs transfers at machine speed
  5328.         (interrupt driven writes);  Some network modems cannot take
  5329.         this speed.
  5330.  
  5331.  
  5332.  
  5333.  
  5334. Version 2.6: 900426
  5335.  
  5336. COM-AND: IBM PC Communication Script Language                 Page  93
  5337.  
  5338.  
  5339. VI.    SET Commands (continued)
  5340.  
  5341.  
  5342.     A. Basic set (continued)
  5343.  
  5344.  ->       SET SOFTFLOW (ON!OFF)
  5345.  
  5346.         SET SOFTFLOW sets and resets software flow control (XON/XOFF)
  5347.         as used in receive and ASCII SEND.
  5348.  
  5349.  ->       SET STOPBITS (1!2)
  5350.  
  5351.         SET STOP sets the communications port to 1 or 2 stop bits.
  5352.  
  5353.  ->       SET SUCCESS (ON!OFF)
  5354.  
  5355.         SET SUCCESS sets and resets the SUCCESS condition tested by
  5356.         the IF statement.  SET SUCCESS be used to modify various
  5357.         conditions that set/reset SUCCESS/FAILURE.
  5358.  
  5359.  ->       SET SWRITE (BIOS!DIRECT!DOS)
  5360.  
  5361.         SET SWRITE sets COM-AND to use either BIOS or direct screen
  5362.         buffer access for menu saves/restores.    Direct access is much
  5363.         faster (of course), however, a certain few machines are not
  5364.         compatible to the extent of screen memory address.
  5365.  
  5366.         SET SWRITE DOS only affects text written to the screen.
  5367.         When used, text received is passed to the console device.
  5368.  
  5369.         SET SWRITE BIOS affects both text written to the screen
  5370.         and the method used for screen saves.  BIOS is used in both
  5371.         cases.    If both SWRITE DOS and SWRITE BIOS are set, text goes
  5372.         through DOS, and screen save/restores go through BIOS.
  5373.  
  5374.        SET TEXT <attr>
  5375.  
  5376.         SET TEXT sets the color for text display.  The change takes
  5377.         effect the next time a character is displayed (it does not
  5378.         repaint).  The new color holds after the script terminates.
  5379.  
  5380.         NOTE: To change the color attribute for the entire screen:
  5381.  
  5382.               SET TEXT <attr>    ; Set text attr for subsequent chars
  5383.               SET COLOR "_COLOR"; Repaint screen and border
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389. Version 2.6: 900426
  5390.  
  5391. COM-AND: IBM PC Communication Script Language                 Page  94
  5392.  
  5393.  
  5394. VI.    SET Commands (continued)
  5395.  
  5396.  
  5397.     A. Basic set (continued)
  5398.  
  5399.        SET TIMER [(#)]
  5400.  
  5401.         The SET TIMER instruction sets the timestamp for one of 10
  5402.         timers.  Timers are read using the TSINCE statement.
  5403.  
  5404.        SET TTHRU (ON!OFF)
  5405.  
  5406.         The SET TTHRU sets the script processor to allow (ON) or not
  5407.         allow (OFF) typethrough during the script.  When set OFF,
  5408.         keystrokes are queued and will be read by KEYGET, ATGET, MAT-
  5409.         GET, GET and MGET.
  5410.  
  5411.         Note that TYPETHRU is a 'global' condition, whereas HITKEY is
  5412.         a 'local' condition.  Typethrough is suspended after HITKEY
  5413.         is tested, until the key is read.  Once the key is read, the
  5414.         HITKEY condition is disabled and typethrough is allowed
  5415.         (unless you've SET TTHRU OFF).
  5416.  
  5417.         Note: Use of SET TTHRU may inhibit termination with ESCape!
  5418.  
  5419.        SET TUNE <string>
  5420.  
  5421.         The SET TUNE sets the alarm tune to the BASIC encoded play
  5422.         statement in <string>.    The ERROR condition is set if the
  5423.         string cannot be parsed (and the alarm is not set).  Refer
  5424.         to Appendix C for the syntax of the play statement.
  5425.  
  5426.        SET VMOUSE #
  5427.  
  5428.         SET HMOUSE specifies the mouse vertical sensitivity.
  5429.  
  5430.        SET WAITFOR (ON!OFF)
  5431.  
  5432.         SET WAITFOR sets and resets the WAITFOR condition tested by
  5433.         the IF statement.  SET LINKED may be used to modify the
  5434.         results of a WAITFOR instruction.
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444. Version 2.6: 900426
  5445.  
  5446. COM-AND: IBM PC Communication Script Language                 Page  95
  5447.  
  5448.  
  5449. VI.    SET Commands (continued)
  5450.  
  5451.  
  5452.     A. Basic set (continued)
  5453.  
  5454.        SET WATCHDOG <seconds>
  5455.  
  5456.         SET WATCHDOG sets the XOFF watchdog timer timeout.  When an
  5457.         XOFF is received a timer begins.  If no XON is received with-
  5458.         in <timer> seconds, the XOFF condition is cancelled.
  5459.  
  5460.         WARNING:  Script authors who use this command to increase the
  5461.         default XOFF timeout run a SERIOUS risk of locking up their
  5462.         machines.  XOFF is a frequent noise character...  Without the
  5463.         watchdog timer, any noise character might stop COM-AND cold.
  5464.  
  5465.        SET XSUI <number>
  5466.  
  5467.         SET XSUI sets the frequency (as an interval of blocks) with
  5468.         which COM-AND updates its protocol status screens during a
  5469.         file transfer.    XSUI is mnemonic for 'xfer screen update
  5470.         interval'.
  5471.  
  5472.         At 9600 baud and above, the time it takes to paint the status
  5473.         screen becomes a signifigant percentage of the overall time
  5474.         spent.    Setting the update interval to '5' will have visible
  5475.         impact at 2400 baud.
  5476.  
  5477.        SET ZMODEM <subcommand>
  5478.  
  5479.         The SET ZMODEM subcommands are discussed below ("VI").
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499. Version 2.6: 900426
  5500.  
  5501. COM-AND: IBM PC Communication Script Language                 Page  96
  5502.  
  5503.  
  5504. VI.    SET Commands (continued)
  5505.  
  5506.  
  5507.     B. SET ASCII subcommands
  5508.  
  5509.  ->       SET ASCII BLANKEX (ON!OFF)
  5510.  
  5511.         SET ASCII BLAN sets and resets blank line expansion for the
  5512.         SENDFILE ASCII function (if the line is empty, one blank is
  5513.         sent if this flag is on).
  5514.  
  5515.  ->       SET ASCII CHARPACE <number>
  5516.  
  5517.         SET ASCII CHARPACE sets an intercharacter delay (in milli-
  5518.         seconds for the SENDFILE ASCII function.
  5519.  
  5520.  ->       SET ASCII ECHO (ON!OFF)
  5521.  
  5522.         SET ASCII ECHO enables (if set) the text echo during a
  5523.         SENDFILE ASCII function (only during current script).
  5524.  
  5525.        SET ASCII FLOW (ON!OFF)
  5526.  
  5527.         SET ASCII FLOW sets and resets flow control SENDFILE ASCII
  5528.         function.  When on, flow control is respected.
  5529.  
  5530.  ->       SET ASCII LINEPACE <number>
  5531.  
  5532.         SET ASCII LINE sets an delay at end-of-line (CR) in tenths
  5533.         of seconds for the SENDFILE ASCII function.
  5534.  
  5535.  ->       SET ASCII PACECHAR <number>
  5536.  
  5537.         SET ASCII PACE sets a pace character for the SENDFILE ASCII
  5538.         function.  The value provided is the decimal ascii value of
  5539.         the pace character (use 0 to turn this off).
  5540.  
  5541.        SET ASCII QUIET (ON!OFF)
  5542.  
  5543.         SET ASCII QUIET disables (if set) the alarm at the end of
  5544.         a SENDFILE ASCII function (only during current script).
  5545.  
  5546.        SET ASCII TABEX (ON!OFF)
  5547.  
  5548.         SET ASCII TABEX sets and resets tab expansion for the
  5549.         SENDFILE ASCII function.
  5550.  
  5551.  
  5552.  
  5553.  
  5554. Version 2.6: 900426
  5555.  
  5556. COM-AND: IBM PC Communication Script Language                 Page  97
  5557.  
  5558.  
  5559. VI.    SET Commands (continued)
  5560.  
  5561.  
  5562.     B. SET ASCII subcommands (continued)
  5563.  
  5564.  ->       SET ASCII UP_LF (LF!STRIP)
  5565.  
  5566.         SET ASCII UP_LF sets and resets LF stripping during a
  5567.         SENDFILE ASCII function.  Note that "UP_LF CR_LF" is
  5568.         not implemented at this time.
  5569.  
  5570.        SET ASCII UP_Z (STOP!SEND)
  5571.  
  5572.         SET ASCII UP_Z sets and resets control-z handling for the
  5573.         SENDFILE ASCII function.  When STOP, the transfer stops at
  5574.         a control-z (and the control-z is not transmitted).
  5575.  
  5576.  
  5577.  
  5578.     C. SET KERMIT subcommands
  5579.  
  5580.  ->       SET KERMIT 8QUOTE <number>
  5581.  
  5582.         SET KERMIT 8QUOTE sets the 8-bit quote character used in
  5583.         KERMIT transfers.  This value may be inspected and changed
  5584.         through Alt-K.    The <number> is the decimal ascii value of
  5585.         the 8-bit quote character to be used.
  5586.  
  5587.  ->       SET KERMIT BLOCKCHECK (1!2!3)
  5588.  
  5589.         SET KERMIT BLOCK sets the length of the blockcheck used in
  5590.         KERMIT transfers.  This value may be inspected and changed
  5591.         through Alt-K.    The blockcheck may be 1, 2 or 3 bytes long.
  5592.  
  5593.  ->       SET KERMIT CQUOTE <number>
  5594.  
  5595.         SET KERMIT CQUOTE sets the control quote character used in
  5596.         KERMIT transfers.  This value may be inspected and changed
  5597.         through Alt-K.    The <number> is the decimal ascii value of
  5598.         the control quote character to be used.
  5599.  
  5600.  ->       SET KERMIT EOLCHAR <number>
  5601.  
  5602.         SET KERMIT EOLCHAR sets the end-of-line character used in
  5603.         KERMIT transfers.  This value may be inspected and changed
  5604.         through Alt-K.    The <number> is the decimal ascii value of
  5605.         the end-of-line character to be used.
  5606.  
  5607.  
  5608.  
  5609. Version 2.6: 900426
  5610.  
  5611. COM-AND: IBM PC Communication Script Language                 Page  98
  5612.  
  5613.  
  5614. VI.    SET Commands (continued)
  5615.  
  5616.  
  5617.     C. SET KERMIT subcommands (continued)
  5618.  
  5619.        SET KERMIT MARK <number>
  5620.  
  5621.         SET KERMIT MARK sets the packet mark character used in
  5622.         KERMIT transfers.  This value may be inspected and changed
  5623.         through Alt-K.    The <number> is the decimal ascii value of
  5624.         the packet mark character to be used.
  5625.  
  5626.  ->       SET KERMIT PADCHAR <number>
  5627.  
  5628.         SET KERMIT PADCHAR sets the pad character used in KERMIT
  5629.         transfers.  This value may be inspected and changed through
  5630.         Alt-K.    The <number> is the decimal ascii value of the pad
  5631.         character to be used.
  5632.  
  5633.  ->       SET KERMIT PADNUM number
  5634.  
  5635.         SET KERMIT PADNUM sets the number of pad characters (if
  5636.         any) to be used during KERMIT transfers.  This value may be
  5637.         inspected and changed through Alt-K.
  5638.  
  5639.        SET KERMIT REPEAT <number>
  5640.  
  5641.         SET KERMIT REPEAT sets the repeat quote character used in
  5642.         KERMIT transfers.  This value may be inspected and changed
  5643.         through Alt-K.    The <number> is the decimal ascii value of
  5644.         the repeat quote character to be used.
  5645.  
  5646.        SET KERMIT WINDOW <number>
  5647.  
  5648.         SET KERMIT WINDOW sets the maximum window size for KERMIT
  5649.         transfers.  A window maximum of 0 stops windowed transfers.
  5650.         COM-AND places an upper limit on this size (currently the
  5651.         limit is 8).
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664. Version 2.6: 900426
  5665.  
  5666. COM-AND: IBM PC Communication Script Language                 Page  99
  5667.  
  5668.  
  5669. VI.    SET Commands (continued)
  5670.  
  5671.  
  5672.     D. SET ZMODEM subcommands
  5673.  
  5674.        SET ZMODEM AUTO (ON!OFF)
  5675.  
  5676.         ZMODEM download is capable of automatically starting when
  5677.         the sender begins transmission.  You may control whether
  5678.         COM-AND will automatically begin the receive.  [Note that
  5679.         during scripted operation, auto-ZMODEM only occurs when the
  5680.         display is being performed.]
  5681.  
  5682.        SET ZMODEM BLOCK <number>
  5683.  
  5684.         SET ZMODEM BLOCK sets a maximum blocksize for ZMODEM sends.
  5685.         When a blocksize is set (rather than negotiated), the trans-
  5686.         fer reverts to half duplex (send, ACK, send, ACK).  This is
  5687.         provided for special cases (badly errored lines).  It is not
  5688.         recommended.
  5689.  
  5690.        SET ZMODEM RECOVER (ON!OFF)
  5691.  
  5692.         SET ZMODEM RECOVER enables and disables ZMODEM's recovery
  5693.         feature.  When a receive is intended for an existing file
  5694.         (intended to be a the result of a previous, failed, trans-
  5695.         fer), the transfer will pick up at the end of file (where the
  5696.         last one stopped), if enabled.    When disabled, transfers go
  5697.         to a unique file name ($ terminated as required).
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719. Version 2.6: 900426
  5720.  
  5721. COM-AND: IBM PC Communication Script Language                 Page 100
  5722.  
  5723.  
  5724. VII.    String Intrinsics
  5725.  
  5726.  
  5727.     Certain string values are treated as having an intrinsic meaning
  5728.     by the script processor.  All intrinsic string values must have
  5729.     an underscore ("_") in column 0 of the string, and otherwise be
  5730.     alone in the string (note that only the first 4 characters of the
  5731.     intrinsic keyword are significant).   For example:
  5732.  
  5733.          S0 = "_Date"            ; is equivalent to
  5734.          S0 = "_DateToday"       ; .. where contiguous text is ignored
  5735.  
  5736.     But  S0 = "_Date today" would not be treated as containing an
  5737.     intrinsic value.
  5738.  
  5739.     When the script processor encounters an intrinsic function, it
  5740.     replaces the value with the computed value.  String intrinsic
  5741.     functions are:
  5742.  
  5743.  
  5744.     _ABLA         ASCII Blankexpand flag
  5745.     _ACCF         Current accessory file
  5746.     _ACHA         ASCII Character pace delay (ms)
  5747.     _ADVE         ADVErt Flag on/off
  5748.     _AECH         ASCII Echo flag
  5749.     _AFLO         ASCII Flow control flag
  5750.     _ALAR         ALARm Flag on/off
  5751.     _ALIN         ASCII Line pace time (.01 ms)
  5752.     _ALLO         0,1,2... number of dynamic variables allocated
  5753.     _APAC         ASCII Pace character (Decimal ASCII value)
  5754.     _AQUI         ASCII Quiet flag
  5755.     _ATAB         ASCII tab expand flag
  5756.     _ATIM         Alarm time (secs)
  5757.     _AUPZ         ASCII Send ctl-z flag (STRIP!SEND)
  5758.     _BAR         (numeric) Status line color attribute
  5759.     _BELL         Bell tone (hz)
  5760.     _BKSC         Backscreen buffer size (pages)
  5761.     _BREA         Break duration (ms)
  5762.     _BSIN         Backspace IN (NONDESTRUC!DESTRUC)
  5763.     _BSOU         Backspace out (BACKSP!DELETE)
  5764.     _BSUP         BSUPpress Flag on/off
  5765.     _CALL         Last dialed dialing directory entry
  5766.     _CDIS         CDISp Flag on/off
  5767.     _CDRE         CDREspect Flag on/off
  5768.     _CHAT         CHAT Flag on/off
  5769.     _CHLI         Chat lines
  5770.     _CLFI         Call Log file name
  5771.  
  5772.  
  5773.  
  5774. Version 2.6: 900426
  5775.  
  5776. COM-AND: IBM PC Communication Script Language                 Page 101
  5777.  
  5778.  
  5779. VII.    String Intrinsics (continued)
  5780.  
  5781.  
  5782.     _CLOC         CLOCk Flag on/off
  5783.     _CLOG         CLOGging Flag on/off
  5784.     _COLO         Color flag on/off
  5785.     _CONN         Connection (formatted: Y/N)
  5786.     _CRLF         CR -> CRLF flag (ON, OFF values, ON = CR->CRLF)
  5787.     _DATE         Current date (formatted: mm/dd/yyyy)
  5788.     _DBLC         Double click interval in MS
  5789.     _DEFA         (numeric) Menu window color attribute
  5790.     _DIRF         Current dialing file
  5791.     _DLDI         Read current download drive:subdirectory
  5792.     _DOW         Day of week (0 -> Sunday, 1 -> Monday, etc)
  5793.     _DPRE         Dialing prefix (from Alt-S)
  5794.     _DROP         Drop DTR flag
  5795.     _DSUF         Dialing suffix (from Alt-S)
  5796.     _DUPL         Duplex setting (HALF!Full)
  5797.     _EFFI         Last transfer efficiency
  5798.     _ELAP         Elapsed time since call (formatted hh:mm:ss:tt)
  5799.     _EMUL         EMULATION (TTY!ANSI!VIDTEX!...)
  5800.     _ERRO         Last transfer error text (formatted: nn: text)
  5801.     _EXIT         Return current exit script name
  5802.     _EXQU         EXQUery Flag on/off
  5803.     _FLOW         FLOW Flag on/off
  5804.     _HARD         Hardware flow control flag
  5805.     _HMOU         Mouse horiz (mickeys)
  5806.     _IFIL         FOPENI (script input) file name
  5807.     _INAF         Init modem after hangup on/off
  5808.     _K8QU         KERMIT 8 bit quote
  5809.     _KBDB         KBDBuf Flag on/off
  5810.     _KCHK         KERMIT Block check
  5811.     _KCQU         KERMIT control quote char
  5812.     _KEOL         KERMIT EOL char
  5813.     _KMAR         KERMIT Mark char
  5814.     _KNUM         KERMIT number pads
  5815.     _KPAD         KERMIT pad char
  5816.     _KREP         KERMIT Repeat char
  5817.     _KWIN         KERMIT max window
  5818.     _LEGE         Returns last LEGEND string displayed (or null)
  5819.     _LOGG         LOGging Flag on/off
  5820.     _LOGH         LOG Held Flag on/off
  5821.     _LOGM         LOGMarked Flag on/off
  5822.     _MACF         Current macro file
  5823.     _MASK         MASK Flag on/off
  5824.     _MCON         Modem connect string (from Alt-S)
  5825.     _MDCH         Modem delay char
  5826.  
  5827.  
  5828.  
  5829. Version 2.6: 900426
  5830.  
  5831. COM-AND: IBM PC Communication Script Language                 Page 102
  5832.  
  5833.  
  5834. VII.    String Intrinsics (continued)
  5835.  
  5836.  
  5837.     _MDEL         Modem character delay (ms)
  5838.     _MENU         Menu mode Flag on/off
  5839.     _MESC         Modem escape string (from Alt-S)
  5840.     _METH         Last transfer method
  5841.     _MHAN         Modem hangup string (from Alt-S)
  5842.     _MINI         Modem initialization string (from Alt-S)
  5843.     _MUSI         MUSIc Flag on/off
  5844.     _NULL         Null value (empty string)
  5845.     _OFIL         FOPENO (script output) file name
  5846.     _ONES         Current ON ESCAPE GOSUB label (8 characters)
  5847.     _OVER         Return OVERLAY file name last loaded (or null)
  5848.     _PARM         Current comm parms (formatted as COMPARM statement)
  5849.     _PCJR         PCJR Flag on/off
  5850.     _PRIN         PRINter Flag on/off
  5851.     _QUIE         QUIEt Flag on/off
  5852.     _RDEL         Reconnect delay (secs)
  5853.     _RDIS         RDISplay Flag on/off
  5854.     _RDMA         ReDial MAximum value (0 -> no limit set)
  5855.     _RDPN         ReDial Pass Number on which CONNECT last occurred
  5856.     _RECH         RECHo Flag on/off
  5857.     _REMA         Remapping on/off
  5858.     _REMO         REMOte Flag on/off
  5859.     _RLEO         RLEOk Flag on/off
  5860.     _RTSD         RTSDiscipline Flag on/off
  5861.     _RTSF         RTSFlow control on/off (a type of hdwe flow control)
  5862.     _SCRI         Current script file name
  5863.     _SILE         Duration (in MS) of ON SILENCE timeout
  5864.     _SIZE         Last transfer size
  5865.     _SLOW         SLOW Flag on/off
  5866.     _SSIZ         Current screen size (# lines)
  5867.     _SUBD         Read current drive:subdirectory
  5868.     _SWRI         Screen write (DOS!BIOS!DIRECT)
  5869.     _TEXT         (numeric) Text window color attribute
  5870.     _TIME         Current time (formatted: hh:mm:ss:tt)
  5871.     _TRAN         In/Out Translate on/off
  5872.     _TRFI         Last transferred file (except multiple transfers)
  5873.     _TRTI         Last transfer time
  5874.     _TTHR         TTHRu Flag on/off
  5875.     _VMOU         Mouse vert (mickeys)
  5876.     _XSUI         Transfer screen update interval
  5877.     _ZAUT         ZMODEM auto download flag
  5878.     _ZBLO         ZMODEM maximum blocksize
  5879.     _ZREC         ZMODEM download recovery flag
  5880.  
  5881.  
  5882.  
  5883.  
  5884. Version 2.6: 900426
  5885.  
  5886. COM-AND: IBM PC Communication Script Language                 Page 103
  5887.  
  5888.  
  5889. VII.    String Intrinsics (continued)
  5890.  
  5891.  
  5892.     Intrinsic returned values are left justified in the string.
  5893.  
  5894.  
  5895.     The returned value may or may not be blank padded.  [Blank padding
  5896.     is of concern in some cases.  The construction 'Sx = Sx&""' may be
  5897.     used to remove trailing spaces.]
  5898.  
  5899.  
  5900.     Note that when a batch file transfer is performed (e.g.  KERMIT),
  5901.     only the last file name transferred is reported.
  5902.  
  5903.  
  5904.     In the case of ZMODEM and YMODEM-Batch the file name is always null,
  5905.     by definition of the protocols.
  5906.  
  5907.  
  5908.     The file transfer intrinsics only refer to binary protocols.  They do
  5909.     not report ASCII transfers.
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939. Version 2.6: 900426
  5940.  
  5941. COM-AND: IBM PC Communication Script Language                 Page 104
  5942.  
  5943.  
  5944. VIII.    Script Errors
  5945.  
  5946.  
  5947.     Errors are reported in the form:  <line #>: <error text>
  5948.  
  5949.     Error texts are:   Invalid token
  5950.  
  5951.                Unexpected end of file
  5952.  
  5953.                Unexpected token
  5954.  
  5955.                Missing token
  5956.  
  5957.                Stack overflow
  5958.  
  5959.                Stack underflow
  5960.  
  5961.                Unexpected characters at end of line
  5962.  
  5963.                Unexpected CASE
  5964.                Unexpected DEFAULT
  5965.                Unexpected ENDCASE
  5966.                Unexpected ENDSWITCH
  5967.                Unexpected ELSE
  5968.                Unexpected ENDIF
  5969.                Unexpected RETURN
  5970.                Unexpected ENDFOR
  5971.                Unexpected UNTIL
  5972.                Unexpected ENDWHILE
  5973.                Unexpected FRETURN
  5974.  
  5975.  
  5976.     Note:  COM-AND does not terminate in all cases where an error is
  5977.     encountered.  Stack over/underflow errors always terminate a
  5978.     script, as do the unexpected CASE/DEFAULT/ENDCASE/ENDSWITCH/
  5979.     ELSE/ENDIF/RETURN errors.  Unexpected end-of-file (when a GOTO
  5980.     branches to a label that does not exist) terminates the script.
  5981.     Other errors do not terminate the script.
  5982.  
  5983.  
  5984.     Note: PROCOMM does not accept a command on a labelled line.
  5985.     However, PROCOMM does not issue an error message at that point
  5986.     either.  COM-AND will report 'unexpected characters at end of
  5987.     line' when this is encountered, and ignore the command.
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994. Version 2.6: 900426
  5995.  
  5996. COM-AND: IBM PC Communication Script Language                 Page 105
  5997.  
  5998.  
  5999. IX.    ASPECT and PROCOMM 2.4.2 scripts
  6000.  
  6001.  
  6002.     COM-AND will execute most scripts written for PROCOMM 2.4.2 and for
  6003.     the ASPECT script language (tm DataStorm).  However, the ASPECT
  6004.     language is only a subset of the COM-AND script language.  Although
  6005.     COM-AND will execute most PROCOMM scripts, PROCOMM will not execute
  6006.     most COM-AND scripts.  To retain ability to execute a script you
  6007.     write under PROCOMM:
  6008.  
  6009.        o     ONLY use statements marked '->' in the discussion above.
  6010.          These statements are compatible with the ASPECT language.
  6011.  
  6012.     o    ONLY use constructions highlighted '->' in the discussion above.
  6013.          For example:  COM-AND will accept (and PROCOMM won't):
  6014.  
  6015.          STRCAT S0 S1(5:10)      ; Extract substring and concatenate
  6016.  
  6017.     o    REFER to the PROCOMM document (or ASPECT manual for full dis-
  6018.          cussion of ANY statement you wish to employ.
  6019.  
  6020.     o    Avoid numeric variables N10-N99
  6021.  
  6022.     o    Avoid string variables S10-S29
  6023.  
  6024.     o    Avoid ALL string variables V0-Vn
  6025.  
  6026.     o    Avoid ALL usage of FLAG variables
  6027.  
  6028.     o    Use full keywords;  do not abbreviate to 4 characters.
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.  
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049. Version 2.6: 900426
  6050.  
  6051. COM-AND: IBM PC Communication Script Language                 Page 106
  6052.  
  6053.  
  6054. IX.    ASPECT and PROCOMM 2.4.2. scripts
  6055.  
  6056.  
  6057.     Unimplemented ASPECT commands
  6058.     -----------------------------
  6059.  
  6060.     Every attempt has been made to provide a script language that is
  6061.     compatible with PROCOMM.  However, certain commands do not apply to
  6062.     COM-AND.  Others have been changed for more of less obvious reasons.
  6063.     Changes and optional usages have been highlighted above.
  6064.  
  6065.  
  6066.     The following ASPECT commands have not been implemented:
  6067.  
  6068.  
  6069.  *    HELP
  6070.  *    HOST
  6071.  *    KERMSERV FINISH
  6072.  *    KERMSERV GETFILE
  6073.  *    KERMSERV LOGOUT
  6074.  *    KERMSERV SENDFILE
  6075.  *    SET ASCII DN_CR (CR!CR_LF!STRIP)
  6076.  *    SET ASCII DN_LF (LF!CR_LF!STRIP)
  6077.  *    SET ASCII UP_CR (CR!CR_LF!STRIP)
  6078.  *    SET CR_OUT (CR!CR_LF)
  6079.  *    SET ENQ ON         ; SET ENQ OFF!CISB implemented
  6080.  *    SET HOSTPSWD <string>
  6081.  *    SET KERMIT PACKSIZE <number>
  6082.  *    SET KERMIT HANDSHAKE <number>
  6083.  *    SET KERMIT FILETYPE (TEXT!BINARY)
  6084.  *    SET SCROLL (ON!OFF)
  6085.  *    SET SHELLPSWD <string>
  6086.  *    SET SOUND (ON!OFF)
  6087.  *    SET TXPACE <number>  ; Partially implemented as SET ASCII CHARPACE
  6088.  *    SET WRAP (ON!OFF)
  6089.  *    SNAPSHOT
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.  
  6099.  
  6100.  
  6101.  
  6102.  
  6103.  
  6104. Version 2.6: 900426
  6105.  
  6106. COM-AND: IBM PC Communication Script Language                 Page 107
  6107.  
  6108.  
  6109. X.    Program Requirements
  6110.  
  6111.  
  6112.     This program will only function on an IBM PC or DOS compatible
  6113.     machine.  COM-AND does direct to screen buffer fetches and stores
  6114.     (unless BIOS screen updates are directed using the /C switch or the
  6115.     Alt-O options menu).
  6116.  
  6117.  
  6118.     COM-AND is TopView aware even without the /C switch or Alt-O option.
  6119.  
  6120.  
  6121.     COM-AND supports MDA, CGA, EGA and Hercules.  COM-AND uses a Micro-
  6122.     soft Mouse if one is available...
  6123.  
  6124.  
  6125.     COM-AND disk I/O is done through the 'Handle' oriented I/O routines
  6126.     added to DOS 2.0.  Therefore DOS 2.0 is a minimum requirement.
  6127.  
  6128.  
  6129.     COM-AND (Version 2.6) requires 251K for itself.  You need 384K
  6130.     minimally to use COM-AND and the DOS Gateway, and more to take
  6131.     advantage of accessories.
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159. Version 2.6: 900426
  6160.  
  6161. COM-AND: IBM PC Communication Script Language                 Page 108
  6162.  
  6163.  
  6164. XI.    Program and Author Information
  6165.  
  6166.  
  6167.     This program was written using Microsoft Macro-Assembler.  The
  6168.     author likes assembler.  Assembly language is an entirely
  6169.     appropriate vehicle for some of the program, and a not-inappro-
  6170.     priate vehicle for the rest of it.  Everything, in moderation...
  6171.  
  6172.  
  6173.     COM-AND has been written by, and is supported by R. Scott McGinnis
  6174.     of Chicago (CABER Software), Illinois.    My PLINK and GEnie IDs are:
  6175.     TARTAN.  My CIS ID is 73147,2665.  Comment and suggestions (and
  6176.     criticism in moderation) are welcomed:
  6177.  
  6178.              CABER Software
  6179.              R. (Scott) McGinnis
  6180.              P.O. Box 3607 Mdse Mart
  6181.              Chicago, IL 60654-0607
  6182.  
  6183.  
  6184.  
  6185.     I must thank Mike Todd and John Poindexter of the Source for their
  6186.     strenuous testing and excellent suggestions.  Mike and John have
  6187.     pushed me hard, and I thank them.  This script language is in large
  6188.     part shaped by these gentlemen.
  6189.  
  6190.  
  6191.     I also thank my wife, Elizabeth, who supported me whole-heartedly
  6192.     in this effort.  She is my lady and my love.
  6193.  
  6194.  
  6195.     This program (Version 2.6) may be distributed freely along with its
  6196.     accessories with the caveat that the Author information displayed at
  6197.     program termination is not removed.  If the program is USED after a
  6198.     reasonable period of evaluation, a registration of $35.00 is
  6199.     required.
  6200.  
  6201.  
  6202.     PROCOMM, PCPLus, and ASPECT are trademarks of the DataStorm cor-
  6203.     poration.  DSZ is a trademark of OMEN Technology.  Windows is a
  6204.     trademark of the MicroSoft Corporation.  DesqView is a trademark
  6205.     of the QuarterDeck Corporation.  Smartmodem is a trademark of the
  6206.     Hayes Corporation.
  6207.  
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214. Version 2.6: 900426
  6215.  
  6216. COM-AND: IBM PC Communication Script Language                 Page 109
  6217.  
  6218.  
  6219. A.    Example scripts
  6220.  
  6221.  
  6222.     A script to dial a modem direct, send two carriage returns, and
  6223.     wait for a logon prompt looks like:
  6224.  
  6225.     ------------------------------------------------------------------
  6226.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  6227.     IF NOT LINKED        ; If script not invoked from Alt-D
  6228.        MESSAGE "^GDialing direct"
  6229.        DIAL "1"             ; Call dial dir entry number 1 (PLINK)
  6230.        IF FAILED        ; IF esc out
  6231.           EXIT        ; terminate script
  6232.           ENDIF        ; End if failed
  6233.        ENDIF        ; End if not linked
  6234.  
  6235.     PAUSE "5"               ; Wait for the modem to settle down
  6236.     TRANSMIT "!"            ; Transmit Carriage return <CR>
  6237.     PAUSE "1"               ; Wait 1 sec
  6238.     TRANSMIT "!"            ; Transmit Carriage return <CR>
  6239.     WAITFOR "USER ID:"      ; Wait for the 'USER ID' prompt
  6240.  
  6241.     SET BSUPPRESS OFF    ; Turn off blank line suppression
  6242.     SET MASK ON        ; Turn on high bit mask
  6243.     SET CDISPLAY ON     ; Display control characterss
  6244.     ALARM            ; Sound alarm:    we're done
  6245.     -------------------------------------------------------------------
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269. Version 2.6: 900426                           Appendices
  6270.  
  6271. COM-AND: IBM PC Communication Script Language                 Page 110
  6272.  
  6273.  
  6274. A.    Example scripts (continued)
  6275.  
  6276.  
  6277.     A script to dial GEnie, and logon makes special provisions to turn
  6278.     echo off (mask it, anyway) during logon:
  6279.  
  6280.     ------------------------------------------------------------------
  6281.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  6282.     IF NOT LINKED        ; If not from Alt-d
  6283.        MESSAGE "^GDialing GEnie direct"
  6284.        DIAL "4"             ; Call dial dir entry number 4 (GEnie)
  6285.        IF FAILED        ; IF esc out
  6286.           EXIT        ; terminate script
  6287.           ENDIF        ; Endif failed
  6288.        ENDIF        ; End test if linked
  6289.  
  6290.     PAUSE "3"               ; Wait for the modem to settle down
  6291.     TRANSMIT "hhh"          ; Transmit
  6292.     WAITFOR "U#="           ; Wait for the 'USER ID' prompt
  6293.  
  6294.     SET BSUPPRESS ON    ; Turn on blank line suppression
  6295.     SET MASK ON        ; Turn on high bit mask
  6296.     SET CDISPLAY OFF    ; Control character display
  6297.     SET DUPLEX FULL     ; Turn off local echo for ID/psw
  6298.     ALARM            ; Sound alarm
  6299.  
  6300.     MESSAGE "^MEnter ID,password for GEnie:"
  6301.     MGET S0         ; Get ID/psw
  6302.     TRANSMIT S0        ; Transmit ID/psw
  6303.     TRANSMIT "^M"           ; .. and a final c/r
  6304.     SET DUPLEX HALF     ; Turn echo back on
  6305.     ------------------------------------------------------------------
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324. Version 2.6: 900426                           Appendices
  6325.  
  6326. COM-AND: IBM PC Communication Script Language                 Page 111
  6327.  
  6328.  
  6329. A.    Example scripts (continued)
  6330.  
  6331.  
  6332.     A script to dial Telenet (entry number 10 in the dialing directory
  6333.     assumed, and make connection according to the parameters set
  6334.     looks like:
  6335.  
  6336.     ------------------------------------------------------------------
  6337.     LEGEND " Dialing Telenet... "
  6338.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  6339.     IF NOT LINKED        ; If script not invoked from Alt-D
  6340.        DIAL "10"            ; Call dial dir entry number 10 (Telenet)
  6341.        IF FAILED        ; IF esc out
  6342.           EXIT        ; terminate script
  6343.           ENDIF        ; End if failed
  6344.        ENDIF        ; End if not linked
  6345.  
  6346.     COMPARMS S1            ; Get current settings
  6347.     IF STRCMP "N" S1(5:5)           ; If no parity
  6348.        IF STRCMP "2400" S1(0:3)     ; If 2400 baud connect Send @D<cr>
  6349.           PAUSE 1            ;    Wait for the modem to settle
  6350.           TRANS "@"                 ;    Send @D<cr> slowly
  6351.           PAUSE 1            ;    Wait a moment
  6352.           TRANS "D"                 ;    Set to 8N1
  6353.           PAUSE 1            ;    Wait a moment
  6354.        ELSE             ; ELSE 300/1200 (send <cr>D<cr>)
  6355.           PAUSE "1"                 ;    Wait for the modem to settle
  6356.           TRANSMIT "!D"             ;    Transmit Carriage return <CR> D
  6357.           ENDIF
  6358.     ELSE                ; ELSE even or odd parity
  6359.        PAUSE "1"                    ;    Wait for the modem to settle
  6360.        TRANSMIT "!"                 ;    Transmit Carriage return <CR>
  6361.        ENDIF
  6362.     PAUSE "1"                       ; Wait 1 sec
  6363.     TRANSMIT "!"                    ; Transmit Carriage return <CR>
  6364.  
  6365.     WAITFOR "TERMINAL="     ; Wait for the prompt
  6366.     TRANSMIT "D1!"          ; Set terminal type
  6367.     WAITFOR "@"             ; Wait for next prompt
  6368.     SET BSUPPRESS OFF    ; Turn off blank line suppression
  6369.     SET MASK ON        ; Turn on high bit mask
  6370.     SET CDISPLAY ON     ; Display control characters
  6371.     ALARM            ; Sound alarm:    we're done
  6372.     ------------------------------------------------------------------
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379. Version 2.6: 900426                           Appendices
  6380.  
  6381. COM-AND: IBM PC Communication Script Language                 Page 112
  6382.  
  6383.  
  6384. B.    HOST and BBS scripts
  6385.  
  6386.  
  6387.     Supplied with this release of COM-AND are two large scripts.
  6388.     HOST.CMD supports a limited Host mode for callers to your PC;
  6389.     BBS.CMD supports a more extensive BBS function (with multiple users,
  6390.     mail, upload/download files, bulletins and so on).
  6391.  
  6392.  
  6393.     The advantage of a scripted HOST or BBS mode is flexibility.  You
  6394.     may use the script as supplied, or tailor it to your needs.  As the
  6395.     supplied scripts use a public domain graphic path display utility
  6396.     (TREED), you will want to remove the function (at least the prompt
  6397.     for it) if you don't have the program.  You may wish to add other
  6398.     functions.
  6399.  
  6400.  
  6401.     Documentation has been provided with each of the scripts.  For those
  6402.     interested in having a simple HOST mode, or a simple BBS, refer to
  6403.     the BBS&HOST archive included with this distribution.
  6404.  
  6405.  
  6406.     The supplied HOST and BBS scripts work best if your modem is set to
  6407.     report the real state of Carrier Detect (CD).  However, it has been
  6408.     used quite successfully with modems that report Carrier Detect
  6409.     always true (when disconnect occurs, Hayes compatible modems report
  6410.     the fact with 'NO CONNECT').
  6411.  
  6412.  
  6413.     These scripts are offered mostly as examples of the script language.
  6414.     Should you feel inclined to rewrite one or the other of these
  6415.     scripts, contact the author.  I would be happy to replace what I've
  6416.     included with a superior effort!
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434. Version 2.6: 900426                           Appendices
  6435.  
  6436. COM-AND: IBM PC Communication Script Language                 Page 113
  6437.  
  6438.  
  6439. C.    External protocol drivers
  6440.  
  6441.  
  6442.     COM-AND supports external protocol drivers through its F1 (access-
  6443.     sories) menu.  You may edit the entries in the F1 menu to load and
  6444.     execute just about any program you might wish (and have memory for).
  6445.     If you limit the F1 entries to simple script invocations, you may
  6446.     also use the script name through F2.
  6447.  
  6448.  
  6449.     For example, you might wish to use a different implementation of
  6450.     ZMODEM than COM-AND's.  [COM-AND implements a complete ZMODEM.  How-
  6451.     ever, some of the management and transfer options are not available
  6452.     through COM-AND.] You might do this with Chuck Forsberg's DSZ.COM
  6453.     program, if you have registered it.  DSZ is a module that may be run
  6454.     from within other comm programs to perform ZMODEM transfers (and
  6455.     X/Ymodem transfers too).  DSZ is revised quite often (to expand its
  6456.     function), and is available on most systems.
  6457.  
  6458.  
  6459.     For downloading purposes, no script is needed to invoke DSZ.  How-
  6460.     ever, as mentioned above, the F1 entry will be coded to use a script
  6461.     to allow the same script to be manual invoked through F2.  The file
  6462.     name used for the downloaded file will be determined by the sender.
  6463.     Revise an F1 entry (with the 'r' subcommand) as follows:
  6464.  
  6465.         Name:        Download using YMODEM
  6466.         Subdirectory:    (whatever subdirectory your DSZ occupies)
  6467.         Program:        (leave this field blank)
  6468.         Script:        DSZDOWN.CMD
  6469.  
  6470.     The script DSZDOWN.CMD could be written:
  6471.     ------------------------------------------------------------------
  6472.     COMPARMS S1        ; read current settings
  6473.     S2 =  "DSZ.COM port " * S1(14:14) * " rb " ; Ask for YMODEM rcv
  6474.     RUN S2            ; Load and run DSZ
  6475.     ------------------------------------------------------------------
  6476.     Note: change " rb " to " rz " for ZMODEM
  6477.     ------------------------------------------------------------------
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489. Version 2.6: 900426                           Appendices
  6490.  
  6491. COM-AND: IBM PC Communication Script Language                 Page 114
  6492.  
  6493.  
  6494. C.    External protocol drivers (continued)
  6495.  
  6496.  
  6497.     DSZ requires a file name for uploading.  You may accomplish this by
  6498.     editing the F1 menu as follows, and creating the following script
  6499.     to request a file name and load DSZ.
  6500.  
  6501.         Name:        Upload using YMODEM
  6502.         Subdirectory:    (whatever subdirectory DSZ/DSZUP occupies)
  6503.         Program:        (leave this field blank)
  6504.         Script:        DSZUP.CMD
  6505.     The script DSZUP.CMD could be written:
  6506.     ------------------------------------------------------------------
  6507.     MESSAGE "^MEnter the upload file name: "
  6508.     GET S0            ; Read keyboard
  6509.     COMPARMS S1        ; read current settings
  6510.     S2 =  "DSZ.COM port " * S1(14:14) * " sb " * S0 ; ask for YMODEM
  6511.     sb" RUN S2                  ; Load and run DSZ
  6512.     ------------------------------------------------------------------
  6513.     Note: change " sb " to " sz " for ZMODEM
  6514.     ------------------------------------------------------------------
  6515.  
  6516.  
  6517.     DSZ defaults to COM1 and your current baud rate.  The above scripts
  6518.     adjust for the comm port you're using.  The above scripts (or better)
  6519.     are included in the SCRIPTS.ARC file released with COM-AND.
  6520.  
  6521.  
  6522.     NOTE: DSZ is user supported.  If you use it, please register it!
  6523.     DSZ may be found on most bulletin boards, and on every major system.
  6524.     Registration information is provided with every release of DSZ.
  6525.  
  6526.  
  6527.     NOTE: More functional scripts for invocation of DSZ are included in
  6528.     the scripts ARC file released with COM-AND.  A pop-up window is used
  6529.     to query the file name, and so on.
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544. Version 2.6: 900426                           Appendices
  6545.  
  6546. COM-AND: IBM PC Communication Script Language                 Page 115
  6547.  
  6548.  
  6549. D.    Encoded music
  6550.  
  6551.  
  6552.     Beginning with version 2.3, COM-AND uses encoded music strings for
  6553.     several different purposes:
  6554.  
  6555.     .  If the file COM-AND.TUN exists on the default drive:subdirectory
  6556.        (or on the COM-AND= drive:subdirectory), and it contains a valid
  6557.        encoded music string (not to exceed 40 notes), COM-AND will use
  6558.        the encoded string for its alarm.
  6559.  
  6560.     .  The alarm tune may be changed with a "SET TUNE" command through
  6561.        a script file.  The new alarm tune holds until it is changed,
  6562.        or until COM-AND is terminated.
  6563.  
  6564.     .  A script may PLAY an encoded music string during its execution
  6565.        (up to 80 notes).
  6566.  
  6567.     .  An escape sequence to play music has been implemented (for some
  6568.        RBBS boards).  The escape sequence is "ESC [M <music string> ^N"
  6569.        allowing up to 255 characters for the <music string>.
  6570.  
  6571.  
  6572.     Music strings are encoded using the BASICA 2.0 PLAY statement syntax.
  6573.     Commands are single characters, followed by one or more parameters.
  6574.     Blanks and commas are allowed for readability.    Case is not signifi-
  6575.     cant.  Commands are:
  6576.  
  6577.     .  A through G:  Play a note in the current octave
  6578.  
  6579.        A note command plays a note in the current octave.  It may be
  6580.        optionally followed by: (1) # (sharp), + (sharp), and - (flat),
  6581.        (2) a duration value (1 through 64, see "L" below),  and (3) one
  6582.        or more periods (dotting) extending the duration by 3/2.  If no
  6583.        duration number is specified the duration is the current default
  6584.        (set by "L", beginning at 4 with each string).  Example:
  6585.  
  6586.         A-16    A-flat in the current octave (sixteenth note)
  6587.  
  6588.        Blanks and commas ARE NOT allowed within the note declaration;
  6589.        e.g. no blank should occur between the command and a flat/sharp.
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599. Version 2.6: 900426                           Appendices
  6600.  
  6601. COM-AND: IBM PC Communication Script Language                 Page 116
  6602.  
  6603.  
  6604. D.    Encoded music (continued)
  6605.  
  6606.  
  6607.     .  O #        Set the current octave
  6608.  
  6609.        There are 7 octaves, numbered 0 through 6.  Middle-C begins octave
  6610.        number 3.  Each string defaults at the start to octave number 4.
  6611.  
  6612.     .  >        Raise the octave by 1
  6613.  
  6614.        The current octave is raised with this command.
  6615.  
  6616.     .  <        Lower the octave by 1
  6617.  
  6618.        The current octave is lowered with this command.
  6619.  
  6620.     .  N #        Play note number 0-84
  6621.  
  6622.        Each octave contains 12 notes (C,C#/D-,D,D#/E-, etc).  Notes are
  6623.        numbered from the 0th octave beginning with 1.  0 is a rest.
  6624.        Note numbers may be followed by duration (blank separated from
  6625.        the note number) and dotting as in the note command.  Example:
  6626.  
  6627.         N36 4.    Middle-C, 3/8ths (dotted quarter)
  6628.  
  6629.     .  L #        Set default duration for following notes
  6630.  
  6631.        The duration of a note is specified as a number, 1 through 64.
  6632.        L1 is a whole note, L2 is a half note, L3 is a triplet, L4 is
  6633.        a quarter note, and so on.  The actual duration (in time) for
  6634.        notes is set through the T (Tempo) command, below.
  6635.  
  6636.     .  P        Pause (rest)
  6637.  
  6638.        Rests may be encoded, using this command with duration and
  6639.        dotting as with the note command.  Example:
  6640.  
  6641.         P1.    Pause for a whole and a half
  6642.  
  6643.     .  T #        Tempo (number of quarter notes per minute)
  6644.  
  6645.        Tempo is specified as a count of quarter notes per minute.  The
  6646.        tempo is allowed to range between 32 and 255, defaulting to 120.
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654. Version 2.6: 900426                           Appendices
  6655.  
  6656. COM-AND: IBM PC Communication Script Language                 Page 117
  6657.  
  6658.  
  6659. D.    Encoded music (continued)
  6660.  
  6661.  
  6662.     .  MN        Normal
  6663.  
  6664.        Each note plays 7/8ths of the time specified (1/8th silence).
  6665.  
  6666.     .  MS        Staccato
  6667.  
  6668.        Each note plays 3/4s of the time specified (1/4 period silence).
  6669.  
  6670.     .  ML        Legato
  6671.  
  6672.        Each note plays the full period specified.
  6673.  
  6674.  
  6675.     Each encoded music string is an entity itself.    Defaults are reset
  6676.     at the beginning of each string.  Defaults are: T120,O4,L4,MN
  6677.     For example, the DRAGNET "dum-dee-dum dum" might be played:
  6678.  
  6679.         PLAY "ms t250 o2 c2d8e-cp4g-1 p2 >c2d8e-cp4g-1 p2"
  6680.  
  6681.  
  6682.  
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709. Version 2.6: 900426                           Appendices
  6710.  
  6711. COM-AND: IBM PC Communication Script Language                 Page 118
  6712.  
  6713.  
  6714. E.    File transfer error numbers
  6715.  
  6716.  
  6717.     COM-AND reports file transfer errors with a number and an explanation
  6718.     on the screen.    When an error is logged to the call-log, however,
  6719.     COM-AND only logs a number.  Error numbers are:
  6720.  
  6721.     DOS errors:
  6722.  
  6723.      1  Invalid function number (from INT 21H)
  6724.      2  File not found
  6725.      3  Path not found
  6726.      4  Too many open files (no handles left)
  6727.      5  Access denied
  6728.      6  Invalid Handle
  6729.      7  Memory control blocks destroyed
  6730.      8  Insufficient memory
  6731.      9  Invalid Memory block address
  6732.     10  Invalid environment
  6733.     11  Invalid format
  6734.     12  Invalid access code
  6735.     13  Invalid data
  6736.     14  Short write.  Disc Full?  Error # generated here
  6737.     15  Invalid drive was specified
  6738.     16  Attempted to remove current directory
  6739.     17  Not same device
  6740.     18  No more files
  6741.  
  6742.  
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.  
  6749.  
  6750.  
  6751.  
  6752.  
  6753.  
  6754.  
  6755.  
  6756.  
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764. Version 2.6: 900426                           Appendices
  6765.  
  6766. COM-AND: IBM PC Communication Script Language                 Page 119
  6767.  
  6768.  
  6769. E.    File transfer error numbers (continued)
  6770.  
  6771.  
  6772.     Program errors (internally generated):
  6773.  
  6774.      1  Other side cancelled        ; All
  6775.      2  Handshake failed            ; ..
  6776.      3  Block sequence error        ; ..
  6777.      4  Complement error            ; ..
  6778.      5  Checksum mismatch            ; ..
  6779.      6  CRC mismatch            ; ..
  6780.      7  Short block received        ; ..
  6781.      8  We cancelled            ; ..
  6782.      9  NAK rcvd/xmitted - retrying     ; ..
  6783.     10  Timeout                ; ..
  6784.     11  Cancelled by operator        ; ..
  6785.     12  Timeout waiting for rcvr ACK    ; ..
  6786.     13  ENQ received during block        ; CISB
  6787.     14  Unrecognized command received    ; ..
  6788.     15  ETX received            ; ..
  6789.     16  Buffer overflow            ; ..
  6790.     17  Wait ACK received from CIS        ; ..
  6791.     18  Send initiate received        ; Kermit
  6792.     19  File Header received        ; ..
  6793.     20  Send-initiate sent            ; ..
  6794.     21  End-of-transfer sent        ; ..
  6795.     22  Other side not using batch        ; Batch-Ymodem
  6796.     23  File name not received        ; ..
  6797.     24  Negotiation packet received     ; CIS Quick-B
  6798.     25  Application inquiry packet received ; CIS Quick-B
  6799.     26  Insufficent space for rcv        ; KERMIT/Batch YMODEM
  6800.     27  Carrier has been dropped        ; All
  6801.     28  ZMODEM frame end            ; ZMODEM (internal)
  6802.     29  ZMODEM encryption requested     ; ZMODEM
  6803.     30  ZMODEM file skipped         ; ZMODEM
  6804.     31  ZMODEM waiting recovery        ; ZMODEM (internal)
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819. Version 2.6: 900426                           Appendices
  6820.  
  6821. COM-AND: IBM PC Communication Script Language                 Page 120
  6822.  
  6823.  
  6824. F.    EBL (Extended Batch Language)
  6825.  
  6826.  
  6827.     Extended Batch Language (EBL) is a command programming language that
  6828.     may be used as a direct replacement of DOS batch files.  It may also
  6829.     be used in conjunction with DOS batch files.
  6830.  
  6831.  
  6832.     A superb example of EBL's power may be seen in the system SIGCOM,
  6833.     which is a communications system for use in the IBMSIG on UNISON
  6834.     (originally created for The SOURCE).  SIGCOM uses EBL to integrate
  6835.     COM-AND with the editor EDWIN and Vern Buerg's LIST.
  6836.  
  6837.  
  6838.     One of the unique features of EBL is its global variables ( %A..%O ).
  6839.     String or numerical values may be assigned to the global variables
  6840.     through EBL batch files.  Once a value is assigned to one of these 15
  6841.     variables it is accessible to other EBL files until it is re-
  6842.     assigned.  This is a powerful feature which allows the passing of
  6843.     parameters from one EBL file to another.  COM-AND makes these global
  6844.     variables available for use in script files through its EBL script
  6845.     command.  The global variables are much more useful than variables in
  6846.     the DOS environment since the global variables are not dependent on
  6847.     whether they are assigned in a child or parent process.
  6848.  
  6849.  
  6850.     Global variables may be set by an EBL file run through COM-AND and
  6851.     then be available to other EBL files run through other COM-AND script
  6852.     files, or run from DOS after exiting COM-AND.  This is not true of
  6853.     normal DOS environment variables.  In a multi-tasking environment
  6854.     such as DESQview each window has its own DOS environment and there is
  6855.     no convenient way to pass DOS environment variables from one window
  6856.     to another.  With the COM-AND EBL command the capability exists to
  6857.     pass data from one window to COM-AND in another window through the
  6858.     EBL global variables.
  6859.  
  6860.  
  6861.     Extended Batch Language may be obtained from SEAWARE Corporation,
  6862.     P.O.  Box 1656, Delray Beach, FL 33444, 800-634-8188 or 407-392-2046.
  6863.     Registration fee is $49.  Extended Batch Language is copyrighted by
  6864.     Seaware Corp.  1982,83,84,85,86,87.
  6865.  
  6866.  
  6867.     The latest version of SIGCOM, the communication system for using the
  6868.     features of UNISON and the IBM Special Interest Group (IBMSIG), is
  6869.     always available from Mike Todd on UNISON via the ID MIKETODD or the
  6870.     IBMSIG EXCHANGE topics in PARTI for details on downloading or having
  6871.     diskettes mailed to your door.
  6872.  
  6873.  
  6874. Version 2.6: 900426                           Appendices
  6875.  
  6876. COM-AND: IBM PC Communication Script Language                 Page 121
  6877.  
  6878.  
  6879. G.    Manual settings and scripts
  6880.  
  6881.  
  6882.     1. Alt-S (Setup window)
  6883.  
  6884.        1)  Modem init string       SET MINIt <str>           _MINI
  6885.        2)  Modem dial prefix       SET DPREfix <str>           _DPRE
  6886.        3)  Modem dial suffix       SET DSUFfix <str>           _DSUF
  6887.        4)  Hang-up string           SET MHANg <str>           _MHAN
  6888.        5)  Escape string           SET MESCape <str>           _MESC
  6889.        6)  Connect string           SET MCONnect <str>           _MESC
  6890.        7)  Call log file           CLOG OPEN <str>           _CLFI
  6891.        8)  Dialing directory       DLOAD <str>               _DIRF
  6892.        9)  Macro directory           MLOAD <str>               _MACF
  6893.        10) RLE temp file           -----               -----
  6894.        11) Accessory direc           ALOAD <str>               _ACCF
  6895.        12) Backscreen Buffer       SET BKSC #               _BKSC
  6896.        13) Break delay           SET BREAK #               _BREA
  6897.        14) Alarm duration           SET ATIME #               _ATIM
  6898.        15) Modem character delay       SET MDELay #            _MDEL
  6899.        16) Reconnect delay           SET RDELay #            _RDEL
  6900.        17) Chat window size        SET CHLInes #           _CHLI
  6901.        18) Mouse vertical           SET VMOUse #            _VMOU
  6902.        19) Mouse horizontal        SET HMOUse #            _HMOU
  6903.        20) Mouse dbl click interval    SET DBLCLICK #           _DBLC
  6904.        21) Bell tone           SET BELL #               _BELL
  6905.        22) Modem delay character       SET MDCHAR #            _MDCH
  6906.        23) Xfer screen upd           SET XSUI #               _XSUI
  6907.  
  6908.        24) Save these values       UPDATE (*)               RESET
  6909.  
  6910.  
  6911.        (*) Note: UPDATE and RESET do not apply to these settings alone.
  6912.            Both commands (UPDATE and RESET) apply to ALL Alt-S, Alt-O,
  6913.            Alt-P, Alt-K, Alt-J settings.  RESET further closes and re-
  6914.            opens the comm port.
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929. Version 2.6: 900426                           Appendices
  6930.  
  6931. COM-AND: IBM PC Communication Script Language                 Page 122
  6932.  
  6933.  
  6934. G.    Manual settings and scripts (continued)
  6935.  
  6936.  
  6937.     2. Alt-O (Options window)
  6938.  
  6939.        1)  Echo received characters    SET DUPLEX HALF!FULL        _DUPL
  6940.        2)  Mask received characters    SET MASK ON!OFF           _MASK
  6941.        3)  Keyboard display        SET KBDBuf ON!OFF           _KBDB
  6942.        4)  Chat mode           SET CHAT ON!OFF           _CHAT
  6943.        5)  Suppress blank lines       SET BSUPpress ON!OFF        _BSUP
  6944.        6)  Alarm noise           SET ALARM ON!OFF           _ALAR
  6945.        7)  Exit query (Alt-X)       SET EXQUery ON!OFF           _EXQU
  6946.        8)  Mark transcript           LOG MARKED ON!OFF           _LOGM
  6947.        9)  Initial advertisement       SET ADVERT ON!OFF           _ADVE
  6948.        10) Use BIOS for screen saves   SET SWRITE BIOS!DIRECT      _SWRI
  6949.        11) Use DOS for screen writes   SET SWRITE DOS!BIOS!DIRECT  _SWRI
  6950.        12) Display control characters  SET CDISPlay ON!OFF           _CDIS
  6951.        13) Perform XON/XOFF Flow ctl   SET FLOW ON!OFF           _FLOW
  6952.        14) Perform hardware Flow ctl   SET HARD ON!OFF           _HARD
  6953.        15) Use RTS(hardware) Flow ctl  SET RTSF ON!OFF           _RTSF
  6954.        16) Drop DTR to hangup       SET DROP ON!OFF           _DROP
  6955.        17) Init modem after hangup       SET INAF ON!OFF           _INAF
  6956.        18) Translate (in and out)       SET TRANslate ON!OFF        _TRAN
  6957.        19) Keyboard remapping       SET REMAP ON!OFF           _REMA
  6958.        20) Nondestructive bksp       SET BACK IN (NOND!DEST)     _BSIN
  6959.        21) Send DELETE as bksp       SET BACK OUT (BACK!DELE)    _BSOU
  6960.        22) CR -> CRLF in display       SET CR CR!CRLF           _CRLF
  6961.        23) Call logging on           SET CLOG ON!OFF           _CLOG
  6962.        24) On screen clock           SET CLOCK ON!OFF           _CLOC
  6963.        25) Suppress bells           SET QUIET ON!OFF           _QUIE
  6964.        26) Menu mode           SET MENUMODE ON!OFF           _MENU
  6965.        27) Respect modem CD        SET CDRESpect ON!OFF        _CDRE
  6966.        28) PCJr (disc suspends comm)   SET PCJR ON!OFF           _PCJR
  6967.        29) Capture/display RLE files   SET RLEOk ON!OFF           _RLEO
  6968.        30) Allow MUSIC strings       SET MUSIC ON!OFF           _MUSI
  6969.        31) Allow REMOTE commands       SET REMOTE ON!OFF           _REMO
  6970.        32) Set slow xfer output       SET SLOW ON!OFF           _SLOW
  6971.        33) Auto ZMODEM download       SET ZMODEM AUTO ON!OFF      _ZAUT
  6972.        34) ZMODEM download recovery    SET ZMODEM RECOVER ON!OFF   _ZREC
  6973.  
  6974.        33) Save these values       UPDATE (*)               RESET
  6975.  
  6976.  
  6977.        (*) Note: UPDATE and RESET do not apply to these settings alone.
  6978.            Both commands (UPDATE and RESET) apply to ALL Alt-S, Alt-O,
  6979.            Alt-P, Alt-K, Alt-J settings.  RESET further closes and re-
  6980.            opens the comm port.
  6981.  
  6982.  
  6983.  
  6984. Version 2.6: 900426                           Appendices
  6985.  
  6986. COM-AND: IBM PC Communication Script Language                 Page 123
  6987.  
  6988.  
  6989. G.    Manual settings and scripts (continued)
  6990.  
  6991.  
  6992.     3. Alt-P (Parameters window)
  6993.  
  6994.        1)     300,E,7,1           SET BAUDRATE 300, +below    _PARM
  6995.        2)    1200,E,7,1           SET BAUDRATE 1200,+below     "
  6996.        3)    2400,E,7,1           SET BAUDRATE 2400,+below     "
  6997.        4)    4800,E,7,1           SET BAUDRATE 4800,+below     "
  6998.        5)    9600,E,7,1           SET BAUDRATE 9600,+below     "
  6999.        6)  19200,E,7,1           SET BAUDRATE 19K, +below     "
  7000.        ..    ..               ..                 "
  7001.        10)     300,N,8,1           SET BAUDRATE 300, +below     "
  7002.        11)    1200,N,8,1           SET BAUDRATE 1200,+below     "
  7003.        12)    2400,N,8,1           SET BAUDRATE 2400,+below     "
  7004.        13)    4800,N,8,1           SET BAUDRATE 4800,+below     "
  7005.        14)    9600,N,8,1           SET BAUDRATE 9600,+below     "
  7006.        15) 19200,N,8,1           SET BAUDRATE 19K, +below     "
  7007.        ..    ..               ..                 "
  7008.        19) EVEN               SET PARITY EVEN         "
  7009.        20) ODD               SET PARITY ODD         "
  7010.        21) NONE               SET PARITY NONE         "
  7011.        22) 7 bits               SET DATABITS 7         "
  7012.        23) 8 bits               SET DATABITS 8         "
  7013.        24) 1 bit               SET STOPBITS 1         "
  7014.        25) 2 bits               SET STOPBITS 2         "
  7015.        26) COM1               SET PORT COM1         "
  7016.        27) COM2               SET PORT COM2         "
  7017.        28) COM3               SET PORT COM3         "
  7018.        29) COM4               SET PORT COM4         "
  7019.        30) Set base/IRQ           SET COMBASE;    COMBASE <port> Nx
  7020.                        SET COMVECT;    COMVEC  <port> Nx
  7021.        31) Save               UPDATE (*, see Alt-S)       RESET
  7022.  
  7023.     4. Alt-K (KERMIT defaults window)
  7024.  
  7025.        1)  Mark character           SET KERMIT MARK #           _KMAR
  7026.        2)  Number of pads           SET KERMIT PADNUM #           _KNUM
  7027.        3)  Pad character           SET KERMIT PADCHAR #        _KPAD
  7028.        4)  Packet terminator       SET KERMIT EOLCHAR #        _KEOL
  7029.        5)  Control quote           SET KERMIT CQUOTE #           _KCQU
  7030.        6)  Binary quote           SET KERMIT 8QUOTE #           _K8QU
  7031.        7)  Check field len           SET KERMIT BLOCKCHECK 1!2!3 _KCHK
  7032.        8)  Compression flag        SET KERMIT REPEAT #           _KREP
  7033.        9)  Max window size           SET KERMIT WINDOW #           _KWIN
  7034.  
  7035.        10) Reset to default values       -----
  7036.        11) Save current values       UPDATE  (*, see Alt-S)      RESET
  7037.  
  7038.  
  7039. Version 2.6: 900426                           Appendices
  7040.  
  7041. COM-AND: IBM PC Communication Script Language                 Page 124
  7042.  
  7043.  
  7044. G.    Manual settings and scripts (continued)
  7045.  
  7046.  
  7047.     5. Alt-J (Colors window)
  7048.  
  7049.        1)  Color               SET COLOR ON!OFF           _COLO
  7050.        2)  Text foreground           COLOR <attr>, SET TEXT      _TEXT
  7051.        3)  Text background           "             "               "
  7052.        4)  Menu foreground           SET DEFAULT <attr>           _DEFA
  7053.        5)  Menu background           "                             "
  7054.        6)  Screen bar foreground       SET BAR <attr>           _BAR
  7055.        7)  Screen bar background       "                             "
  7056.  
  7057.        8)  Save these values       UPDATE (*, see Alt-S)       RESET
  7058.  
  7059.  
  7060.     6. Help (General help list)
  7061.  
  7062.        F1 -- Accessories           ACCESSORY #
  7063.        F10 - This screen           -----
  7064.  
  7065.        Alt-F10 - DOS Gateway       SHELL
  7066.        Ctl-End - Break           BREAK [#]
  7067.  
  7068.        F2 -- Perform script        EXECUTE <string>
  7069.        F3 -- Current d:subdir       CHDIR <string>
  7070.        F4 -- DLoad d:subdir        SET DLDIR <string>
  7071.        F5 -- ASCII Upload           SENDFILE ASCII <name>
  7072.        F6 -- ASCII Download        GETFILE ASCII <name>
  7073.        F7 -- Toggle disc log       LOG OPEN <str>,LOG CLOSE
  7074.        F8 -- Toggle KBD disp       SET KBDBuf ON!OFF
  7075.        F9 -- Toggle log hold       LOG SUSPEND, LOG RESUME
  7076.        PgUp  Upload a file           SENDFILE <method> ...
  7077.        PgDn  Download a file       GETFILE <method> ...
  7078.  
  7079.        Alt-0/9    Execute a macro       MACRO #
  7080.        Ctrl-PrtSc Toggles printer       SET PRINTER ON!OFF
  7081.  
  7082.  
  7083.  
  7084.  
  7085.  
  7086.  
  7087.  
  7088.  
  7089.  
  7090.  
  7091.  
  7092.  
  7093.  
  7094. Version 2.6: 900426                           Appendices
  7095.  
  7096. COM-AND: IBM PC Communication Script Language                 Page 125
  7097.  
  7098.  
  7099. G.    Manual settings and scripts (continued)
  7100.  
  7101.  
  7102.     6. Help (continued)
  7103.  
  7104.        Alt-A - Toggle Chat mode       SET CHAT ON!OFF
  7105.        Alt-B - Redisplay           -----
  7106.        Alt-C - Clear screen        CLEAR <attr>
  7107.        Alt-D - Dial            DIAL #
  7108.        Alt-E - Toggle echo           SET DUPLEX FULL!HALF
  7109.        Alt-F - File directory       DIR
  7110.        Alt-G - Toggle blank-lines       SET BSUP ON!OFF
  7111.        Alt-H - Hang up           HANGUP
  7112.        Alt-I - Program info        VERSION Sx
  7113.        Alt-J - Set screen colors       above
  7114.        Alt-K - Set KERMIT parms       above
  7115.        Alt-L - Toggle 25/43 lines       SET 25, SET 43
  7116.        Alt-M - Define a macro       SET MACRO # <string>
  7117.        Alt-N - Encrypt/Decrypt       ENCRYPT ..., DECRYPT ...
  7118.        Alt-O - Set options           above
  7119.        Alt-P - Set comm params       above
  7120.        Alt-R - Redial last number       DIAL
  7121.        Alt-S - Initial values       above
  7122.        Alt-T - Time(s) and alarm       SET ALARM
  7123.        Alt-U - Annotate call log       CLOG <string>
  7124.        Alt-V - Emulation           EMULATE <method>
  7125.        Alt-W - Playback           TYPE <string>
  7126.        Alt-X - Terminate program       BYE
  7127.        Alt-Z - Toggle 7bit mask       SET MASK ON!OFF
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.  
  7137.  
  7138.  
  7139.  
  7140.  
  7141.  
  7142.  
  7143.  
  7144.  
  7145.  
  7146.  
  7147.  
  7148.  
  7149. Version 2.6: 900426                           Appendices
  7150.  
  7151. COM-AND: IBM PC Communication Script Language                 Page 126
  7152.  
  7153.  
  7154. H.    STACK and Macro keycodes
  7155.  
  7156.  
  7157.     COM-AND application keystrokes may be created in a script itself.
  7158.     The script must (1) turn off the keyboard, (2) stack the keystrokes
  7159.     and (3) terminate the script.  For example, making a script:
  7160.  
  7161.          SET TTHRU OFF        ; Turn off keyboard
  7162.          STACK "^@<SOURCE!"         ; Stack command to invoke F2
  7163.          EXIT            ; Terminate script to execute
  7164.  
  7165.     actually invokes the F2 (execute script) window, and passes the
  7166.     name "SOURCE" with a terminating carriage return to the F2 window.
  7167.     The ^@ indicates that the following character is to be interpreted
  7168.     as an 'extended keystroke', i.e. not-ASCII.  The extended
  7169.     character set is:
  7170.  
  7171.     Macro seq    Key     Macro seq      Key         Macro seq      Key
  7172.     ---------    ---     ---------    -----         ---------    -----
  7173.     ^@;          F1     ^@^^    Alt-A         ^@1    Alt-N
  7174.     ^@<          F2     ^@1    Alt-B         ^@^X    Alt-O
  7175.     ^@=          F3     ^@.    Alt-C         ^@^Y    Alt-P
  7176.     ^@>          F4     ^@ (space) Alt-D         ^@^P    Alt-Q
  7177.     ^@?          F5     ^@^R    Alt-E         ^@^S    Alt-R
  7178.     ^@@          F6     ^@!    Alt-F         ^@^_    Alt-S
  7179.     ^@A          F7     ^@"        Alt-G        ^@^T       Alt-T
  7180.     ^@B          F8     ^@#    Alt-H         ^@^V    Alt-U
  7181.     ^@C          F9     ^@^W    Alt-I         ^@/    Alt-V
  7182.     ^@D         F10     ^@$    Alt-J         ^@^Q    Alt-W
  7183.     ^@I        PgUp     ^@%    Alt-K         ^@-    Alt-X
  7184.     ^@Q        PgDn     ^@&    Alt-L         ^@^U    Alt-Y
  7185.     ^@u     Ctl-End     ^@2    Alt-M         ^@,    Alt-Z
  7186.  
  7187.     Note, too, that Alt-A (requiring "^^") is unprogrammable.
  7188.  
  7189.  
  7190.     In the above example, the F2 key was represented by "^@<".  When
  7191.     the F2 key is pressed a window is opened and a search for all
  7192.     files *.CMD and *.ENF takes place.  In simpler terms, pressing the
  7193.     F2 key takes TIME.  COM-AND defines the ASCII value 255 as a short
  7194.     cut to execute a script.  The macro:
  7195.  
  7196.          " SOURCE!"
  7197.  
  7198.     has the same effect, and doesn't open the script window.  If the
  7199.     first character following the 255 is ".", the text will be executed
  7200.     as a single script command.  Otherwise, the text is interpreted as a
  7201.     script file name to be executed.
  7202.  
  7203.  
  7204. Version 2.6: 900426                           Appendices
  7205.  
  7206. COM-AND: IBM PC Communication Script Language                 Page 127
  7207.  
  7208.  
  7209. I.    Dynamic String Variables
  7210.  
  7211.  
  7212.     With version 2.6, script authors may now ALLOCATE string variables
  7213.     in addition to the 30 static string variables always available.  The
  7214.     variables are used as V0,V1,...  and may be used in any statement now
  7215.     now supporting static string variables (S0,S1...).  There are a few
  7216.     differences, however.
  7217.  
  7218.     o    Allocated variables must be ALLOCATEd before they are used,
  7219.         once in a COM-AND session.  They do NOT necessarily need to
  7220.         be ALLOCATEd in the script that invokes them, however.
  7221.     o    Allocated variables are NOT deallocated when a script ends.
  7222.     o    Allocated variables are NOT cleared when a script terminates.
  7223.         One script may set values and a second may read them.
  7224.     o    Allocated variables ARE deallocated when COM-AND terminates.
  7225.  
  7226.  
  7227.     Dynamic variables are allocated from free memory, over and above the
  7228.     memory used by COM-AND normally.  Therefore, not all PC installations
  7229.     will allow dynamic allocation.    The ALLOCATE and LOAD ALLOCAT state-
  7230.     ments return SUCCESS/FAIL according to the result of the operation.
  7231.     A script author should only ALLOCATE as many variables (limited to
  7232.     100 max) as absolutely needed.
  7233.  
  7234.  
  7235.     Some large script systems will ALLOCATE variables and expect the area
  7236.     to be available during an entire COM-AND session.  Other scripts will
  7237.     have need for extended variables, but only during the single script's
  7238.     execution.  In a one-time case, the following is suggested:
  7239.  
  7240.     On initialization:
  7241.  
  7242.     DELETE "Script.dat"             ; Delete this script's save file
  7243.     STORE ALLOC "Script.dat"        ; Save current allocation, if any
  7244.     ALLOCATE <number>        ; Deallocate and allocate anew
  7245.     IF FAILED            ; If allocation failed
  7246.        MESS "Cannot allocate memory for variables"
  7247.        ...
  7248.        ENDIF
  7249.  
  7250.     On termination:
  7251.  
  7252.     DEALLOCATE            ; Clear our allocation
  7253.     IF ISFILE "Script.dat"          ; If something previously allocated
  7254.        LOAD ALLOCATED "Lister.dat"
  7255.        DELETE "Lister.dat"          ; Delete same file
  7256.        ENDIF
  7257.  
  7258.  
  7259. Version 2.6: 900426                           Appendices
  7260.  
  7261. COM-AND: IBM PC Communication Script Language                 Page 128
  7262.  
  7263.  
  7264. I.    Dynamic String Variables (continued)
  7265.  
  7266.  
  7267.     For the author preparing a suite of scripts expecting dynamic
  7268.     variables to be prepared prior to any one script's execution, it is
  7269.     suggested that one dynamic variable (say V0) contain a string that
  7270.     identifies the script-set.  Each script of the suite expecting the
  7271.     prepared area might then execute the following as it begins:
  7272.  
  7273.     IF NOT ALLOCATED        ; Somebody dealloc'd us
  7274.        LOAD ALLOC "Suite.dat"       ; Retrieve values from disc
  7275.        IF FAILED GOTO AllocErr    ; LOAD failed for some reason
  7276.        ENDIF
  7277.  
  7278.     IF NOT STRCMP V0 "My very own"
  7279.        LOAD ALLOC "Suite.dat"       ; Retrieve values from disc
  7280.        IF FAILED GOTO AllocErr    ; LOAD failed for some reason
  7281.        ENDIF
  7282.  
  7283.     ...                ; OK to proceed
  7284.  
  7285.  
  7286.     For this technique to be effective, the file containing dynamic
  7287.     variables must be updated by individual scripts as they exit.
  7288.  
  7289.  
  7290.     -------------------------------------------------------------------
  7291.     Note that the test for an allocated area is performed here BEFORE a
  7292.     dynamic variable (V0) is referenced.  The dynamic variables are valid
  7293.     syntactically ONLY when an area is allocated.  Because the interpre-
  7294.     tor evaluates ALL components of a condition, the following syntax,
  7295.     therefore, generates a syntax error when no area is allocated:
  7296.  
  7297.     IF NOT ALLOCATED or NOT STRCMP V0 "My very own"
  7298.        LOAD ALLOC "Suite.dat"       ; Retrieve values from disc
  7299.        IF FAILED GOTO AllocErr    ; LOAD failed for some reason
  7300.        ENDIF
  7301.  
  7302.  
  7303.     When "NOT ALLOCATED" is true, "NOT STRCMP V0 ..." is still executed.
  7304.     The reference to V0 in this case would therefore be a syntax error.
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314. Version 2.6: 900426                           Appendices
  7315.  
  7316. COM-AND: IBM PC Communication Script Language                 Page 129
  7317.  
  7318.  
  7319. J.    Flow control methods
  7320.  
  7321.  
  7322.     Some variations on flow control are available through COM-AND.    The
  7323.     discussion here centers on the script commands controlling flow con-
  7324.     trol...  Note SOFT, HARD, and RTS flow control default conditions
  7325.     may be set through Alt-O... whereas RTS discipline is script-only.
  7326.  
  7327.  
  7328.     1) XON/XOFF flow control:
  7329.  
  7330.        SET SOFTFLOW ON
  7331.        SET HARDFLOW OFF
  7332.        SET RTSDISCIPLINE ON     ; Default condition
  7333.        SET RTSFLOW OFF        ; Default condition
  7334.  
  7335.        This is the one everyone understands.  XOFFs are sent to tell the
  7336.        opposite side "whoa", and XON send to say "have at it".
  7337.  
  7338.  
  7339.     2) Hardware flow control (unidirectional):
  7340.  
  7341.        SET SOFTFLOW OFF
  7342.        SET HARDFLOW ON
  7343.        SET RTSDISCIPLINE ON     ; Default condition
  7344.        SET RTSFLOW OFF        ; Default condition
  7345.  
  7346.        This is the RS232 standard: COM-AND raises RTS before sending a
  7347.        character, and waits for the modem to raise CTS.  No provision is
  7348.        made for COM-AND to tell the modem "gimme a break, man".
  7349.  
  7350.  
  7351.     3) Hardware flow control (modified unidirectional):
  7352.  
  7353.        SET SOFTFLOW OFF
  7354.        SET HARDFLOW ON
  7355.        SET RTSDISCIPLINE OFF
  7356.        SET RTSFLOW OFF        ; Default condition
  7357.        SET RTS ...            ; Dynamically
  7358.  
  7359.        This is a curiosity implemented for some interesting devices that
  7360.        will not be discussed here.    This setting waits for CTS from the
  7361.        modem before sending, but gives control over RTS to a script.
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369. Version 2.6: 900426                           Appendices
  7370.  
  7371. COM-AND: IBM PC Communication Script Language                 Page 130
  7372.  
  7373.  
  7374. J.    Flow control methods (continued)
  7375.  
  7376.  
  7377.     4) Hardware flow control (bidirectional):
  7378.  
  7379.        SET SOFTFLOW OFF
  7380.        SET HARDFLOW ON
  7381.        SET RTSDISCIPLINE ON     ; Default condition
  7382.        SET RTSFLOW ON
  7383.  
  7384.        This is a bidirectional version of hardware flow control.  COM-AND
  7385.        waits for CTS before sending.  COM-AND raises and lowers RTS to
  7386.        signal its own buffer full conditions to the modem.
  7387.  
  7388.  
  7389.     5) Software AND hardware flow control (uni/bidirectional):
  7390.  
  7391.        SET SOFTFLOW ON
  7392.        SET HARDFLOW ON
  7393.        SET RTSDISCIPLINE ON     ; Default condition
  7394.        SET RTSFLOW ...        ; ON or OFF (bi/unidirectional)
  7395.  
  7396.        Soft and Hard flow control (hardware flow control being either
  7397.        uni- or bidirectional) may be selected.  In most cases this is
  7398.        the desired setting when the modem requires a hard flow control,
  7399.        and the protocol/carrier requires a soft flow control.
  7400.  
  7401.  
  7402.     The following modems require bidirectional hardware flow control:
  7403.  
  7404.         MultiTech "Multimodem V.32" (possibly all MultiTechs that support
  7405.         PC to modem interface at different speed from the modem to host)
  7406.  
  7407.         US Robotics Courier 9600 HST (???)
  7408.         Telebit T2500         (???)
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424. Version 2.6: 900426                           Appendices
  7425.  
  7426. COM-AND: IBM PC Communication Script Language                 Page 131
  7427.  
  7428.  
  7429. K.    Machine Language Subroutines
  7430.  
  7431.  
  7432.     The script statements OVERLAY and SCALL offer means to extend the
  7433.     script language at a script author's discretion.  Needless to say,
  7434.     however, not all systems will support OVERLAY, and development of an
  7435.     OVERLAY proper is difficult, dangerous, and frustrating.
  7436.  
  7437.  
  7438.     The OVERLAY statement loads an EXE or COM file as an overlay to
  7439.     COM-AND.  The size of the code/data being loaded as an overlay is
  7440.     limited by available memory.  [It is NOT limited to 64K.].  There-
  7441.     fore, a given overlay will not run on all systems... only those with
  7442.     sufficient available memory.
  7443.  
  7444.  
  7445.     An overlay is terminated when COM-AND terminates.  It may be cleared
  7446.     by a script itself, with the statement "OVERLAY CLEAR".  It is
  7447.     recommended that a script using overlay(s) terminate its overlay when
  7448.     the function is complete - the memory used for the overlay detracts
  7449.     from the space available for SHELL, and accessories.
  7450.  
  7451.  
  7452.     An overlay is entered with the SCALL instruction.  SCALL must specify
  7453.     the entry address relative to the first 64K of the overlay space.
  7454.     Thus, all entry points in an overlay MUST be in its first 64K.    The
  7455.     overlay is entered through a FAR CALL.    Thus, all entry points MUST
  7456.     be FAR procedures (with RETFs, not RETs).
  7457.  
  7458.  
  7459.     SCALL optionally specifies a parameter list to be passed to the over-
  7460.     lay procedure.    Parameters on this list are passed by reference
  7461.     through the stack.  Thus, all passed parameters MUST be simple
  7462.     variables (Nx, Sx, or Vx), and all passed parameters may be modified.
  7463.     On entry to an overlay procedure, the stack looks like:
  7464.  
  7465.  
  7466.  
  7467.  
  7468.  
  7469.  
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479. Version 2.6: 900426                           Appendices
  7480.  
  7481. COM-AND: IBM PC Communication Script Language                 Page 132
  7482.  
  7483.  
  7484. K.    Machine Language Subroutines (continued)
  7485.  
  7486.  
  7487.     +------------------------+
  7488.     !    Segment (16 bits)     !
  7489.     +---              ---+
  7490.     !             ! SP+4n+2
  7491.     +------------------------+        1st parm if 1 or more passed
  7492.     !             !
  7493.     +---              ---+
  7494.     !    Offset (16 bits)     ! SP+4n
  7495.     +------------------------+
  7496.     //            //        ...
  7497.     +------------------------+
  7498.     !    Segment (16 bits)     !
  7499.     +---              ---+
  7500.     !             ! SP+6     3rd parm if 3 parm passed
  7501.     +------------------------+        2nd parm if 2 parm passed
  7502.     !             !        1st parm if 1 parm passed
  7503.     +---              ---+
  7504.     !    Offset (16 bits)     ! SP+4
  7505.     +------------------------+
  7506.     !    Segment (16 bits)     !
  7507.     +---              ---+
  7508.     !             ! SP+2
  7509.     +--- Return address   ---+        FAR CALL return address
  7510.     !             !
  7511.     +---              ---+
  7512.     !    Offset (16 bits)     ! SP+0
  7513.     +------------------------+
  7514.  
  7515.  
  7516.     Approximately 700 bytes of stack space are available when an overlay
  7517.     is entered.  An overlay requiring more stack space must provide its
  7518.     own stack (and mechanism to switch to its own stack when an overlay
  7519.     procedure is entered).
  7520.  
  7521.  
  7522.     The overlay may or may not pop the passed parameter references from
  7523.     the stack on return.  COM-AND resets the stack pointer as required.
  7524.     Similarly, the overlay procedure does not have to concern itself with
  7525.     saving and restoring certain registers.  COM-AND preserves all
  7526.     registers that it itself requires.
  7527.  
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534. Version 2.6: 900426                           Appendices
  7535.  
  7536. COM-AND: IBM PC Communication Script Language                 Page 133
  7537.  
  7538.  
  7539. K.    Machine Language Subroutines (continued)
  7540.  
  7541.  
  7542.     Parameters passed/returned to/from an overlay have the form:
  7543.  
  7544.     o    Nx: the reference Segment:offset points directly to the
  7545.         integer variable.  It is 16 bits, in the usual lsb,msb form.
  7546.  
  7547.     o    Sx,Vx: the reference Segment:offset points to character 0 of
  7548.         a string variable.  String variables are 80 bytes wide, null
  7549.         filled on the right if short.  Care must be take NOT to store
  7550.         past 80 characters, as there's NO telling what might be lost.
  7551.  
  7552.  
  7553.     Variables come from different segments.  The developer of a machine
  7554.     language subroutine cannot expect all passed variables to have the
  7555.     same segment reference.
  7556.  
  7557.  
  7558.     During an overlay, it should be noted that the BIOS comm support
  7559.     interrupt (for the comm port COM-AND has open) are redirected through
  7560.     COM-AND.  Thus, interrupt driven reads (at any speed supported by
  7561.     COM-AND) may be performed through COM-AND.  The BIOS 'open' for the
  7562.     comm port COM-AND has open is no-op'd.
  7563.  
  7564.  
  7565.     The development of a nontrivial overlay for a script is difficult, to
  7566.     say the least.    Obvious errors will lock the machine up tight, or
  7567.     render the environment (COM-AND) unstable.  Subtle errors may have
  7568.     the same effect, or worse.  Debugging an overlay is difficult.
  7569.  
  7570.  
  7571.     It is possible to develop an overlay using a high level language.
  7572.     However, each language compiler makes different provisions for the
  7573.     initialization of the environment.  An overlay, of course, does not
  7574.     automatically invoke the required initializations (e.g. 80x87
  7575.     emulation library routines).  The developer of any high level
  7576.     language routine serving as a foreign subroutine must take this into
  7577.     account.
  7578.  
  7579.  
  7580.     One final caution.  During the development of TALKER.OVL, this author
  7581.     found MicroSoft's EXEPACK to emit executable object that is not
  7582.     relocatable when loaded as an overlay.    This author does not
  7583.     recommend use of EXEPACK on overlay code until the code is proven to
  7584.     work, and then only with suspicion.
  7585.  
  7586.  
  7587.  
  7588.  
  7589. Version 2.6: 900426                           Appendices
  7590.  
  7591. COM-AND: IBM PC Communication Script Language                 Page 134
  7592.  
  7593.  
  7594. L.    Script Language (Version 1.x)
  7595.  
  7596.  
  7597.     Version 1.x of PC-VCO included a primitive script facility.  That
  7598.     script language paralleled the original script language of PROCOMM
  7599.     version 1.x.  The only command whose meaning(s) changed was %F.  The
  7600.     %F paralleled the COM-AND Alt-P menu, as PROCOMM's %F paralleled its
  7601.     Alt-P menu.  Under most usages this make no difference.
  7602.  
  7603.  
  7604.     The introduction of the 2.x script processor retained the original
  7605.     script language as a subset.  A 1.x script command is signalled by a
  7606.     '%' sign.  The % must be followed by one, two or three alpha-numeric
  7607.     characters (no blanks) and possibly a quoted string (e.g.  "GENIE.
  7608.     CMD").  Text on a line not a part of a valid command is ignored.
  7609.     1.x script commands may not be mixed on a line with 2.x commands.
  7610.  
  7611.  
  7612.     Multiple 1.x commands may be placed on a single line.  SYNTAX errors
  7613.     are reported.  On 'end-of-file', COM-AND returns to the normal
  7614.     interactive mode (unless %Q was specified in the script).
  7615.  
  7616.  
  7617.     Currently, the version 1.x command set is:
  7618.  
  7619.  ->    %A        Alarm
  7620.  ->    %B"str"         Default Drive/path
  7621.  ->    %C"nn"          Call directory number
  7622.  ->    %D"str"         DOS command
  7623.  ->    %En        Emulations:  unimplemented except for ANSI BBS
  7624.  *        %E0        Unimplemented
  7625.  *        %E1        Unimplemented
  7626.  *        %E2        Unimplemented
  7627.  *        %E3        Unimplemented
  7628.  *        %E4        Unimplemented
  7629.  *        %E5        Unimplemented
  7630.  *        %E6        Unimplemented
  7631.  ->        %E7        ANSI-BBS
  7632.  *        %E8        Unimplemented
  7633.  *        %E9        Unimplemented
  7634.  ->    %Fn        Comm Parms (equivalent to selection 'n' from Alt-P)
  7635.  ->    %G        Screen dump:  unimplemented
  7636.  ->    %H        Hang up
  7637.  ->    %I"str"         Wait for incoming string
  7638.  ->    %Jn        Send macro string 'n', n=0-9
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644. Version 2.6: 900426                           Appendices
  7645.  
  7646. COM-AND: IBM PC Communication Script Language                 Page 135
  7647.  
  7648.  
  7649. L.    Script Language (Version 1.x, continued)
  7650.  
  7651.  
  7652.  ->    %Ks        KERMIT server commands:  unimplemented
  7653.  *        %KMn        Unimplemented
  7654.  *        %KR        Unimplemented
  7655.  *        %KS"File_Name"  Unimplemented
  7656.  *        %KF        Unimplemented
  7657.  *        %KL        Unimplemented
  7658.  ->    %Ls        Log commands
  7659.  ->        %LO "File_Name" Open log using "File_Name" (no default)
  7660.  ->        %LH        Hold logging
  7661.  ->        %LR        Resume logging
  7662.  ->        %LC        Close log
  7663.  ->    %M"str"         Display a message on the screen
  7664.  ->    %N"str"         Prompt for input and send
  7665.  ->    %Os        BIOS/Direct screen writes
  7666.  ->        %OB        Write to screen through BIOS
  7667.  ->        %OD        Write to screen direct
  7668.  ->    %P"nn"          Seconds to wait for an incoming string
  7669.  ->    %Q        Quit program
  7670.  ->    %R"nn"          Redial delay value
  7671.  ->    %Ss        Sound controls.
  7672.  ->        %SY        Allow alarm sounds
  7673.  ->        %SN        No alarm sounds (though alarm will delay)
  7674.  ->        %ST"nn"         Set delay for alarm (value in seconds)
  7675.  ->    %T"str"         Transmit string
  7676.  ->    %Us        Miscellaneous:    implemented as applicable
  7677.  ->        %U1        Clear screen
  7678.  *        %U2        Send CR as CR: unimplemented
  7679.  *        %U3        Send CR as CR/LF: unimplemented
  7680.  ->        %U4        Set full duplex (echoplex)
  7681.  ->        %U5        Set half duplex
  7682.  ->        %U6        Send Break signal
  7683.  *        %U7        Set line wrap on: unimplemented
  7684.  *        %U8        Set line wrap off: unimplemented
  7685.  *        %U9        Set Scroll on: unimplemented
  7686.  *        %U0        Set Scroll off: unimplemented
  7687.  
  7688.  
  7689.  
  7690.  
  7691.  
  7692.  
  7693.  
  7694.  
  7695.  
  7696.  
  7697.  
  7698.  
  7699. Version 2.6: 900426                           Appendices
  7700.  
  7701. COM-AND: IBM PC Communication Script Language                 Page 136
  7702.  
  7703.  
  7704. L.    Script Language (Version 1.x, continued)
  7705.  
  7706.  
  7707.  ->    %Vs        Miscellaneous:    VCO specific subcommands
  7708.  *        %V0        Unimplemented (PC-VCO used for Voice)
  7709.  *        %V1        Unimplemented (PC-VCO used for Voice)
  7710.  *        %V2        Unimplemented (PC-VCO used for Voice)
  7711.         %V3        Blank line suppression on (Alt-G)
  7712.         %V4        Blank line suppression off (Alt-G)
  7713.         %V5        High bit masking on (Alt-Z)
  7714.         %V6        High bit masking off (Alt-Z)
  7715.         %V7        Chat mode on (Alt-A)
  7716.         %V8        Chat mode off (Alt-A)
  7717.         %V9        WXMODEM send allowed (not used now)
  7718.         %VA        WXMODEM send not allowed (not used now)
  7719.         %VB        WXMODEM receive allowed (not used now)
  7720.         %VC        WXMODEM receive not allowed (not used now)
  7721.         %VD"File_Name"  Unimplemented (PC-VCO FLB fname)
  7722.         %VE"File_Name"  Unimplemented (PC-VCO EXC fname)
  7723.  *        %VF        Unimplemented (PC-VCO use PLINK/CIS)
  7724.  *        %VG        Unimplemented (PC-VCO use GEnie/Delphi)
  7725.  ->    %W"nn"          Wait for a specified # seconds
  7726.  ->    %Xs        XMODEM receive/send
  7727.  ->        %XR"File_Name"
  7728.  ->        %XS"File_Name"
  7729.  ->    %Ys        ASCII Send
  7730.  *        %YP"nn"         Set pacing: unimplemented
  7731.  ->        %YT"File_name"  Transmit file_name using ASCII send
  7732.         %Y0"str"        Set host prompt character
  7733.         %Y1        Turn off host prompt character
  7734.         %Y2        Transmit linefeeds on
  7735.         %Y3        Transmit linefeeds off
  7736.         %Y4        Tab expansion on
  7737.         %Y5        Tab expansion off
  7738.         %Y6"nn"         Set intercharacter delay (in milliseconds)
  7739.  ->    %Zs        Translate tables:  unimplemented.
  7740.  *        %ZY        Translate table on:  unimplemented
  7741.  *        %ZN        Translate table off:  unimplemented
  7742.  
  7743.     --------------------------------------------------------------------
  7744.     The notation '->' to the left of a script command indicates that it
  7745.     IS a part of the PROCOMM script language.  Unmarked extensions were
  7746.     added for COM-AND, to provide its features to script file users.
  7747.     --------------------------------------------------------------------
  7748.     The notation '*' to the left of a script command indicates that
  7749.     it is unimplemented (but will be accepted).  Commands marked 'unim-
  7750.     plemented' are parsed and accepted by COM-AND, but not executed.
  7751.  
  7752.  
  7753.  
  7754. Version 2.6: 900426                           Appendices
  7755.  
  7756. COM-AND: IBM PC Communication Script Language                 Page 137
  7757.  
  7758.  
  7759. M.    Language Summary
  7760.  
  7761.  
  7762.     Version 2.1 of COM-AND included a script processor that performed
  7763.     scripts written for PROCOMM 2.4.2 and also extended the script
  7764.     language considerably (substring extraction, concatenation, ...).
  7765.     When PROCOMM Plus was released, COM-AND's script language was again
  7766.     extended, to include ASPECT as a subset, and also to add functions
  7767.     requested by COM-AND users.  The resulting language syntax is
  7768.     summarized below.
  7769.  
  7770.  
  7771.     Between COM-AND 2.1 and COM-AND 2.2 a certain few instructions and
  7772.     usages did change, most notably the indexing of substrings.  COM-AND
  7773.     2.1 numbered characters in substrings from 1.  ASPECT added substring
  7774.     functions, but numbered characters from 0.  This author could not
  7775.     release a script language that contained both usages, and deferred to
  7776.     PCPlus.  For any inconvenience to COM-AND users, I apologize.
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.     -----------------------------------------------------------------
  7783.     The notation '->' to the left of a script command below indicates
  7784.     that it IS compatible with the ASPECT script language.
  7785.  
  7786.     -----------------------------------------------------------------
  7787.     The notation '*' to the left of a script command indicates that it
  7788.     is unimplemented (but will be accepted).  Commands marked 'unim-
  7789.     plemented' are parsed and accepted by COM-AND.  SYNTAX errors in
  7790.     command formation are not necessarily reported.
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.  
  7804.  
  7805.  
  7806.  
  7807.  
  7808.  
  7809. Version 2.6: 900426                           Appendices
  7810.  
  7811. COM-AND: IBM PC Communication Script Language                 Page 138
  7812.  
  7813.  
  7814. M.    Language Summary (continued)
  7815.  
  7816.  
  7817.   Page     Syntax              Comment
  7818.   ------ ------------------------------- -----------------------------
  7819.   11:     ACCESSORY <string>         ; Accessory directory entry # 1-50
  7820.   11: -> ADD Nx Ny Nz             ; Nz = Nx+Ny
  7821.   12: -> ALARM [<number>]         ; Time in seconds
  7822.   12:     ALOAD <string>          ; Load accessory directory
  7823.   12:     ALLOCATE <number>         ; Allocate up to 100 variables
  7824.   12:     ANAME Sx <number>         ; Acc Dir entry name
  7825.   13:     APGM Sx <number>         ; Acc Dir program invocation
  7826.   13:     ASCRIPT Sx <number>         ; Acc Dir script invocation
  7827.   13: -> ASSIGN Sx <string>         ; Set a value into Sx
  7828.   13:     ASUBDIR Sx <number>         ; Acc Dir subdirectory field
  7829.   13: -> ATGET row col attr len Sx     ; GET performed with positioning
  7830.   14: -> ATOI Sx Nx             ; Convert a str variable to num
  7831.   14: -> ATSAY row col attr <string>     ; MESSAGE performed with positioning
  7832.   14:     ATSCR row col len Sx         ; Read screen at location for len
  7833.   14: -> BOX row col row col attr     ; Draw a box (clear within)
  7834.   15: -> BREAK [<number>]         ; Time in milliseconds
  7835.   15: -> BYE                 ; Exit script and pgm - leave DTR
  7836.   15: -> CASE (<string>!<number>)     ; Within SWITCH/ENDSWITCH
  7837.   15: -> CHDIR <string>          ; Change d:\path
  7838.   16: -> CLEAR <attr>             ; Clear screen
  7839.   16:     CLOG OPEN <string>         ; Open call-logging file by name
  7840.   16:     CLOG CLOSE             ; Close call-logging
  7841.   16:     CLOG <string>             ; Write to call-log if open
  7842.   17:     COLOR <attr>             ; Set screen text color
  7843.   17:     COMBASE <port> Nx         ; Get base addr of COMx
  7844.   17:     COMPARMS Sx             ; Return current comm parm settings
  7845.   17:     COMVECTOR <port> Nx         ; Get vector # for COMx
  7846.   18:     CONCAT Sx [(##)!*] <string>     ; Concatenate text to Sx [at col ##]
  7847.   18: -> CONNECT             ; Exit script
  7848.   18:     CRC <string> Nx         ; Compute buffer CRC
  7849.   19:     CTOI Sx Nx             ; Character to value conversion
  7850.   19: -> CUROFF              ; Turn off cursor (EXIT turns on)
  7851.   19: -> CURON                 ; Turn on cursor (if off)
  7852.   19: -> CURSOR Nx Ny             ; Read cursor (nx=row,ny=col)
  7853.   19: -> CWHEN [(#)]             ; # = 0,1,2,...9
  7854.   20: -> DATE Sx (0!1)             ; System date
  7855.   20:     DEALLOCATE             ; Deallocate dynamic variables
  7856.   20: -> DEC Nx              ; Decrement a numeric variables
  7857.   20:     DECRYPT <string><string><string>; Decrypt a file to a file using psw
  7858.   20: -> DEFAULT             ; Within SWITCH/ENDSWITCH
  7859.   21:     DEFTIME <number>         ; WAITFOR, etc in seconds
  7860.   21:     DELETE <string>         ; Delete a file by name (SUCCESS)
  7861.   21: -> DIAL <string>             ; Dialing directory entry # 1-100
  7862.  
  7863.  
  7864. Version 2.6: 900426                           Appendices
  7865.  
  7866. COM-AND: IBM PC Communication Script Language                 Page 139
  7867.  
  7868.  
  7869. M.    Language Summary (continued)
  7870.  
  7871.  
  7872.   Page     Syntax              Comment
  7873.   ------ ------------------------------- -----------------------------
  7874.   22: -> DIR <string>             ; Perform Alt-F directory function
  7875.   22:     DIRECTORY Sx [<number>]     ; Return dialing entry name
  7876.   22: -> DIV Nx Ny Nz             ; Nz = Nx/Ny
  7877.   22:     DLDIR Sx             ; Read current download d:subdir
  7878.   22:     DLOAD <string>          ; File name argument
  7879.   23:     DNUMBER Sx [<number>]         ; Return dialing entry number
  7880.   23:     DO                 ; Begin a DO-Loop clause (see UNTIL)
  7881.  
  7882.         DO ; Start loop here        ; Example
  7883.         ...                 ; Example
  7884.         UNTIL <condition>            ; Example
  7885.  
  7886.   24: -> DOS <string> [WAIT]         ; Perform a DOS command
  7887.   24:     DPARMS Sx [<number>]         ; Return dialing entry parms
  7888.   24:     DSCRIPT Sx [<number>]         ; Return dialing entry script
  7889.   25:     DWINDOW row,col,row,col     ; Set scrolling region
  7890.   25:     DWINDOW CLEAR             ; Reset scrolling region to original
  7891.   25:     EBL Sx <EBL var>         ; Access EBL global (%A-%O, &...)
  7892.   26:     EBLSET &<name> Sx         ; Set EBL extended variable
  7893.   26: -> ELSE                 ; Within IF/ENDIF
  7894.   26:     ELSE statement          ; ENDIF not required this form
  7895.   26: -> EMULATE (TTY!ANSI!VIDTEX!VT100!VT52)
  7896.   27:     ENCRYPT <string><string><string> [DES!SIM!AUT] ; Encrypt a file
  7897.   15: -> ENDCASE             ; Terminates CASE or DEFAULT clause
  7898.   34:     ENDFOR              ; Terminates a FOR Loop
  7899.   43: -> ENDIF                 ; Terminates an IF clause
  7900.   73: -> ENDSWITCH             ; Terminates a SWITCH clause
  7901.   79:     ENDWHILE             ; Terminates a WHILE clause
  7902.   27:     ENVIRON Sx <string>         ; Return environment variable value
  7903.   28: -> EXECUTE <string>         ; Chain to new script
  7904.   28: -> EXIT                 ; Terminate script
  7905.   28: -> FATSAY row col attr <fmtstr> <parms> ; Fmttd MESS performed with pos
  7906.   29:     FATTR Sx <file>         ; File attribute, binary, (SUCCESS)
  7907.   30:     FCALL <file>             ; CALL a file as a subroutine
  7908.   31: -> FCLOSEI             ; Close input file
  7909.   31: -> FCLOSEO             ; Close output file
  7910.   31:     FDATE Sx <file> [0!1]         ; Date last modified (SUCCESS flag)
  7911.   31:     FFIRST Sx             ; Initialize wildcard (SUCCESS flag)
  7912.   32: -> FGETC Sx             ; Read a character
  7913.   32: -> FGETS Sx             ; Read a record
  7914.   32: -> FIND Sx <string> [Nx]         ; Test for index in Sx
  7915.   33:     FNEXT    Sx [QUAL]         ; Next file after FFIRST (SUCCESS)
  7916.  
  7917.  
  7918.  
  7919. Version 2.6: 900426                           Appendices
  7920.  
  7921. COM-AND: IBM PC Communication Script Language                 Page 140
  7922.  
  7923.  
  7924. M.    Language Summary (continued)
  7925.  
  7926.  
  7927.   Page     Syntax              Comment
  7928.   ------ ------------------------------- -----------------------------
  7929.   33: -> FOPENI Sx [TEXT!BINARY]     ; Open a file for input
  7930.   33: -> FOPENO Sx [TEXT!BINARY!APPEND]  ; Open a file for output
  7931.   34:     FOR Nx = <val> <val> [<val>]     ; FOR Loop (init,final,step)
  7932.  
  7933.         FOR Nx = <val> <val> [<val>]    ; Example
  7934.         ...                ; Example
  7935.         ENDFOR                ; Example
  7936.  
  7937.   35: -> FPUTC Sx             ; Read a character
  7938.   35: -> FPUTS Sx             ; Read a record
  7939.   35: -> FREAD Sx Nx Ny          ; Read a record (Nx may be literal)
  7940.   36:     FREE  Sx <string>         ; Get available space on <disc>
  7941.   36:     FRESTORE[I!O]             ; Restore position from last FSAV
  7942.   36:     FRETURN             ; RETURN from an FCALL
  7943.   37:     FSAVE[I!O]             ; Save input/output file position
  7944.   37:     FSAVE[I!O] CLEAR         ; Clear stack of saved positions
  7945.   37:     FSAVE[I!O] SHIFT         ; Shift stack of saved pos down 1
  7946.   37:     FSAVE[I!O] POP          ; Throw away last saved position
  7947.   37:     FSIZE Sx <file>         ; File size, 7 digits, (SUCCESS)
  7948.   37:     FTIME Sx <file> [0!1]         ; Time last modified (SUCCESS flag)
  7949.   38: -> FWRITE Sx Nx             ; Write a record (Nx may be literal)
  7950.   38: -> GET Sx [<number>]         ; <number> = maximum length
  7951.   39: -> GETFILE ASCII      <string>     ; A.K.A. Buffer capture
  7952.   39: -> GETFILE BYMODEM         ; Batch YMODEM (True ... (TM))
  7953.   39: -> GETFILE BYMODEMG         ; Streaming YMODEM (batch)
  7954.   39: -> GETFILE CISB             ; CompuServe B-protocol
  7955.   39: -> GETFILE KERMIT          ; Kermit or SuperKermit
  7956.   39:     GETFILE QUICKB          ; CompuServe Quick B-protocol
  7957.   39: -> GETFILE RXMODEM  <string>     ; Relaxed CRC or Checksum XMODEM
  7958.   39: -> GETFILE WXMODEM  <string>     ; Windowed XMODEM
  7959.   39: -> GETFILE XMODEM   <string>     ; CRC or Checksum XMODEM
  7960.   39: -> GETFILE YMODEM   <string>     ; Simple YMODEM (not True ... (TM))
  7961.   39:     GETFILE ZMODEM          ; ZMODEM (batch)
  7962.   40: -> GOSUB <string>          ; Call a subroutine (and return)
  7963.   41: -> GOTO <string>             ; Branch (not into IF or SWITCH)
  7964.   42: -> HANGUP              ; Disconnect call
  7965.       *  HELP                 ; Help processor (unimplemented)
  7966.       *  HOST                 ; Host mode (unimplemented)
  7967.   43:     IF [NOT] ALPHA Sx         ; Test for alpha char
  7968.   43:     IF [NOT] ALLOCATED         ; Test for dynamic variables
  7969.   43: -> IF [NOT] CONNECTED         ; Test modem carrier (CD)
  7970.   43:     IF [NOT] CONTROL Sx         ; Test for control char
  7971.   43: -> IF [NOT] EOF             ; Test for EOF on input file
  7972.  
  7973.  
  7974. Version 2.6: 900426                           Appendices
  7975.  
  7976. COM-AND: IBM PC Communication Script Language                 Page 141
  7977.  
  7978.  
  7979. M.    Language Summary (continued)
  7980.  
  7981.  
  7982.   Page     Syntax              Comment
  7983.   ------ ------------------------------- -----------------------------
  7984.   43:     IF [NOT] ERROR          ; Test last instruction
  7985.   43: -> IF [NOT] FAILURE         ; .. NOT SUCCESS
  7986.   43:     IF [NOT] FCALLED         ; Test for FCALL return required
  7987.   43:     IF [NOT] FKEY             ; Test for ftn key pending
  7988.   43:     IF [NOT] FLAG [(#)]         ; Test flag variable
  7989.   43:     IF [NOT] FCALLED         ; Test for FCALL of script
  7990.   43:     IF [NOT] FIND Sx Sy [Nx]     ; Test for Sx .within. Sy
  7991.   43: -> IF [NOT] FOUND          ; Test last FIND statement
  7992.   43:     IF [NOT] FULL             ; Test if we have XOFFed host
  7993.   43: -> IF [NOT] HITKEY         ; Test for keypress pending
  7994.   43:     IF [NOT] ISDLFILE Sx         ; Test for file presence
  7995.   43: -> IF [NOT] ISFILE Sx         ; Test for file presence
  7996.   43:     IF [NOT] ISSCFILE Sx         ; Test for file presence
  7997.   43: -> IF [NOT] LINKED         ; If script executed from dialing
  7998.   43: -> IF [NOT] MONO             ; Test for monochrome adapter
  7999.   43:     IF [NOT] NULL Sx         ; Test for Sx blank or null
  8000.   43:     IF [NOT] NUMERIC Sx         ; Test for numeric character
  8001.   43:     IF [NOT] OVERLAY         ; Test for overlay loaded
  8002.   43:     IF [NOT] PRINTER         ; Test for PRINTER ON
  8003.   43:     IF [NOT] RECEIVE         ; Test for comm chars pending
  8004.   43:     IF [NOT] SPECIAL Sx         ; Test for special character
  8005.   43:     IF [NOT] STRCMP Sx Sy         ; Test Sx = Sy
  8006.   43: -> IF [NOT] SUCCESS         ; Test last statement
  8007.   43:     IF [NOT] TRACE          ; Test for tracing
  8008.   43: -> IF [NOT] WAITFOR         ; Test last WAITFOR statement
  8009.   43:     IF [NOT] XOFF             ; Test for XOFF condition
  8010.   43: -> IF [NOT] ZERO Nx         ; Test for Nx = 0
  8011.   43: -> IF [NOT] GT!LT!GE!LE!EQ Nx Ny     ; Test for Nx .condition. Ny
  8012.   43:     IF [NOT] NE Nx Ny         ; Test for not equal
  8013.   43:     IF [NOT] Nx GT!LT!GE!LE!EQ Ny     ; Test for Nx .condition. Ny
  8014.  
  8015.       ->    IF condition            ; Test condition
  8016.            ..                ; .. execute this if true
  8017.       ->    ELSE                ; Optional ELSE clause
  8018.            ..                ; .. execute this if false
  8019.       ->    ENDIF                ; End of IF
  8020.         - or -
  8021.         IF condition statement        ; ENDIF-less form
  8022.         - or -
  8023.         IF condition            ; ELSE allows one-liner too
  8024.            ..
  8025.         ELSE statement            ; ENDIF-less form
  8026.  
  8027.  
  8028.  
  8029. Version 2.6: 900426                           Appendices
  8030.  
  8031. COM-AND: IBM PC Communication Script Language                 Page 142
  8032.  
  8033.  
  8034. M.    Language Summary (continued)
  8035.  
  8036.  
  8037.   Page     Syntax              Comment
  8038.   ------ ------------------------------- -----------------------------
  8039.   48: -> INC Nx              ; Increment a numeric var
  8040.   48: -> INIT Nx <number>         ; Initialize a numeric variable
  8041.   49:     INPUT Nx <address>         ; Machine level INPUT
  8042.   49:     ISDLFILE <string>         ; Test for presence of a dload file
  8043.   49: -> ISFILE <string>         ; Test for presence of a file
  8044.   50:     ISSCFILE <string>         ; Test for presence of a script file
  8045.   50: -> ITOA Nx Sx             ; Numeric to string conversion
  8046.   50:     ITOC Nx Sx             ; Value to character conversion
  8047.       *  KERMSERV FINISH         ; Unimplemented
  8048.       *  KERMSERV GETFILE         ; Unimplemented
  8049.       *  KERMSERV LOGOUT         ; Unimplemented
  8050.       *  KERMSERV SENDFILE         ; Unimplemented
  8051.   51: -> KEYGET Sx             ; Read ('a', esc='1b', F1='3b00')
  8052.   51: -> KFLUSH              ; Flush keyboard buffer
  8053.   51:     LD Sx <number>          ; Return long dist string 1,2,3,4
  8054.   51:     LEGEND <string>         ; Text for status line
  8055.   52:     LENGTH Sx Nx             ; Compute length of string
  8056.   52:     LJ Sx                 ; Left justify string variable
  8057.   52:     LOAD (DIAL!MACR!ACCE!DEFA!ALLOC) [parms] ; Load file data
  8058.   52: -> LOCATE <number> <number>     ; Position cursor <row> <col>
  8059.   53: -> LOG OPEN <string>         ; Open disk/PRN logging
  8060.   53: -> LOG CLOSE             ; Close disk/PRN logging
  8061.   53: -> LOG SUSPEND             ; Suspend disk/PRN logging
  8062.   53: -> LOG RESUME             ; Resume disk/PRN logging
  8063.   53:     LOG MARKED (ON!OFF)         ; Set/reset log timestamping
  8064.   53:     LOWER Sx             ; Lower case contents of Sx
  8065.   53: -> MACRO <num> [Sx]         ; <num> = 0-9, Sx optional
  8066.   54: -> MATGET row col attr len Sx     ; MGET performed with positioning
  8067.   54: -> MDIAL <string>          ; Dial number in Sx manually
  8068.   54: -> MESSAGE <string>         ; Write text to local console
  8069.   54: -> MGET Sx <number>         ; <number> = max length
  8070.   55: -> MLOAD <string>          ; File name argument
  8071.   55:     MSR Nx              ; Read the modem status register
  8072.   55: -> MUL Nx Ny Nz             ; Nz = Nx*Ny
  8073.   56:     Nx = expression         ; Compute a value and assign it
  8074.   57:     OUTPUT <address> Nx         ; Machine level OUTPUT
  8075.   57:     ON ESCAPE GOSUB <label>     ; Action on operator escape
  8076.   57:     ON ESCAPE CLEAR         ; Clear set action
  8077.   57:     ON SILENCE GOSUB <label>     ; Action on receive timeout
  8078.   57:     ON SILENCE CLEAR         ; Clear set action
  8079.   58:     OVERLAY <file>          ; Load .EXE or .COM overlay
  8080.   58:     OVERLAY CLEAR             ; Release overlay area
  8081.   59: -> PAUSE [<number>]         ; Time in seconds
  8082.  
  8083.  
  8084. Version 2.6: 900426                           Appendices
  8085.  
  8086. COM-AND: IBM PC Communication Script Language                 Page 143
  8087.  
  8088.  
  8089. M.    Language Summary (continued)
  8090.  
  8091.  
  8092.   Page     Syntax              Comment
  8093.   ------ ------------------------------- -----------------------------
  8094.   59:     PERFORM <string>         ; Perform string as command
  8095.   59:     PLAY <string>             ; Play a music string
  8096.   59:     PRESERVE Sx             ; Modify to avoid edits
  8097.   60: -> PRINTER (ON!OFF)         ; Turn printer copy on/off
  8098.   60:     PRINT <string>          ; Send <string> to LP1 printer
  8099.   60: -> QUIT                 ; Terminate script
  8100.   61:     READ Sx Nx Ny             ; Read a record (Nx may be literal)
  8101.   61:     RENAME Sx Sy             ; Rename a file by name (SUCCESS)
  8102.   61:     RESET                 ; Restore dfts to load-time values
  8103.   62:     RESTORE             ; Restore last saved area on screen
  8104.   62: -> RETURN              ; Return from GOSUB
  8105.   62:     REWIND              ; Rewind input (SUCCESS)
  8106.   62: -> RFLUSH              ; FLush receive buffer
  8107.   63: -> RGET Sx [<number> [<number>]]     ; <length> <delay in seconds>
  8108.   63:     RND <modulus> Nx         ; Return random number
  8109.   63:     RJ Sx                 ; Right justify string variable
  8110.   64: -> RUN <string> [WAIT]         ; Load and execute a program
  8111.   64:     SAVE row col row col         ; Save an area on the screen
  8112.   64:     SCALL <addr> [parms[,parms]]     ; Call an overlay procedure
  8113.   65: -> SCROLL cnt row col row col attr ; Scroll a region on the screen
  8114.   65:     SCREEN row col row col attr Sx  ; Multiline screen display
  8115.   66: -> SENDFILE ASCII     <string>     ; A.K.A. Buffer capture
  8116.   66: -> SENDFILE BYMODEM   <string>     ; Batch YMODEM (True ... (TM))
  8117.   66: -> SENDFILE BYMODEMG  <string>     ; Streaming YMODEM (batch)
  8118.   66: -> SENDFILE CISB             ; CompuServe B-protocol
  8119.   66: -> SENDFILE KERMIT    <string>     ; Kermit or SuperKermit
  8120.   66:     SENDFILE QUICKB         ; CompuServe Quick B-protocol
  8121.   66: -> SENDFILE RXMODEM   <string>     ; Relaxed CRC or Checksum XMODEM
  8122.   66: -> SENDFILE WXMODEM   <string>     ; Windowed XMODEM
  8123.   66: -> SENDFILE XMODEM    <string>     ; CRC or Checksum XMODEM
  8124.   66: -> SENDFILE YMODEM    <string>     ; Simple YMODEM (not True ... (TM))
  8125.   66:     SENDFILE ZMODEM    <string>     ; ZMODEM transfer (batch)
  8126.   82: -> SET <subcommand>         ; See below
  8127.   66: -> SHELL                 ; SHELL to DOS (must exit manually)
  8128.   67:     SNAME Sx             ; Name of current script file
  8129.       *  SNAPSHOT             ; Unimplemented
  8130.   67: -> SOUND Nx Ny             ; Sound frequency Nx for Ny msecs
  8131.   67:     SSIZE Nx             ; Return # screen lines
  8132.   68:     STACK <string>          ; Store <string> in BIOS kbd buffer
  8133.   68:     STACK CLEAR             ; Clear BIOS keyboard buffer
  8134.   68:     STORE (DIAL!MACR!ACCE!DEFA!ALLOC) [parms] ; Create new setting file
  8135.   69: -> STRCAT Sx Sy             ; Concatenate 2 strings
  8136.   69: -> STRCMP Sx Sy             ; Compare Sy to Sx (case sensitive)
  8137.  
  8138.  
  8139. Version 2.6: 900426                           Appendices
  8140.  
  8141. COM-AND: IBM PC Communication Script Language                 Page 144
  8142.  
  8143.  
  8144. M.    Language Summary (continued)
  8145.  
  8146.  
  8147.   Page     Syntax              Comment
  8148.   ------ ------------------------------- -----------------------------
  8149.   69: -> STRCPY Sx Sy             ; ASSIGN Sy to Sx
  8150.   70: -> STRFMT Sx <fmtstr> <parms>     ; Fmt Sx using <fmtstr> and <parm>
  8151.   71: -> SUB Nx Ny Nz             ; Nz = Nx-Ny
  8152.   71:     SUBDIR Sx             ; Set d:subdir into Sx
  8153.   71: -> SUBSTR Sx Sy <number> <number>  ; Take substr from Sy, place in Sx
  8154.   72:     SUSPEND FOR Nx Ny         ; Suspend for duration (h,m)
  8155.   72: -> SUSPEND UNTIL Nx Ny         ; Suspend until time (military fmt)
  8156.   73: -> SWITCH (Sx!Nx)          ; Variable to be tested
  8157.  
  8158.       ->    SWITCH (Sx!Nx)            ; Variable to be tested
  8159.       ->       CASE (<string>!<number>)     ; Match Sx and <string>
  8160.            ...                ; .. Execute if they match
  8161.       ->       ENDCASE                ; Each case must have an ENDCASE
  8162.       ->       CASE <string>            ; <String> = "_NULL" -> empty
  8163.            ...
  8164.       ->       ENDCASE                ; End of second case
  8165.            ...
  8166.       ->       DEFAULT                ; DEFAULT executed if no case
  8167.            ...                ; .. above matched
  8168.       ->       ENDCASE                ; End of DEFAULT case, too
  8169.       ->    ENDSWITCH                ; End of SWITCH domain
  8170.  
  8171.   74:     Sx(m:n) = expression         ; Concatenate strings and assign
  8172.   74: -> TERMINAL             ; Exit script
  8173.   75: -> TIME Sx [0!1]             ; System time (1 -> military fmt)
  8174.   75: -> TRACE (ON!OFF)          ; Script tracing
  8175.   75: -> TRANSMIT <string>         ; Send exactly <string>
  8176.   75:     TSINCE [(#)] Nx Ny Nz         ; Read time since timer (#) in h,m,s
  8177.   76: -> TYPE <string>             ; Display contents of a file (Alt-W)
  8178.   76:     UNTIL <condition as IF>     ; Terminates a DO-Loop
  8179.   76:     UPPER Sx             ; Upper case contents of Sx
  8180.   76:     VERSION Nx             ; Read COM-AND VERSION #
  8181.   77: -> WAITFOR <string> [<number>]     ; Optional time in seconds
  8182.   77:     WCLOSE              ; Close an open window
  8183.   78: -> WHEN [(#)] <string> <string>     ; <target> <response>
  8184.   79:     WHILE <condition>         ; Begins a conditional loop if true
  8185.  
  8186.         WHILE <condition>            ; Example
  8187.            ...                ; Example
  8188.            ENDWHILE             ; Example
  8189.  
  8190.   80:     WOPEN row col row col attr [label] ; Open window (label optional)
  8191.   81:     WRITE Sx [Nx]             ; Write a record (Nx optional)
  8192.  
  8193.  
  8194. Version 2.6: 900426                           Appendices
  8195.  
  8196. COM-AND: IBM PC Communication Script Language                 Page 145
  8197.  
  8198.  
  8199. M.    Language Summary (continued)
  8200.  
  8201.  
  8202.   Page     Syntax              Comment
  8203.   ------ ------------------------------- -----------------------------
  8204.   82:     SET 25              ; CGA/Mono
  8205.   82:     SET 43              ; EGA mode
  8206.   82:     SET ACCE NAME # <string>     ; Acc Dir entry name field
  8207.   82:     SET ACCE SUBD # <string>     ; Acc Dir entry subdir field
  8208.   82:     SET ACCE PGM  # <string>     ; Acc Dir entry pgm field
  8209.   82:     SET ACCE SCRI # <string>     ; Acc Dir entry script field
  8210.   82:     SET ADVERT (ON!OFF)         ; Set initial advert on/off
  8211.   82: -> SET ALARM (ON!OFF)         ; Disable alarm sound (see ATIME)
  8212.   82:     SET ANYWHEN (ON!OFF)         ; WHEN exact (off), or substr (on)
  8213.   96: -> SET ASCII <subcommand>      ; See below
  8214.   82: -> SET ATIME <number>         ; Alarm time in seconds
  8215.   82: -> SET BACKSPACE IN (NONDEST!DEST) ; Bkspace function when rcv'd
  8216.   82: -> SET BACKSPACE OUT (BACK!DELETE) ; Bkspace function when sent
  8217.   82:     SET BAR <attr>          ; Set status line color
  8218.   82: -> SET BAUDRATE (300!1200!2400!4800!9600!19K!38K!56K!115K)
  8219.   82:     SET BELL #             ; Set bell tone in Hz
  8220.   82:     SET BKSCREEN #          ; Backscreen size 0-64
  8221.   82: -> SET BREAK <number>         ; Time in milliseconds
  8222.   82:     SET BSUPPRESS (ON!OFF)      ; Blank line suppression
  8223.   82:     SET CALLLOG (ON!OFF)         ; Set/reset call logging
  8224.   82:     SET CDISPLAY (ON!OFF)         ; Control character display
  8225.   82:     SET CDRESPECT (ON!OFF)      ; Set/reset CD respect
  8226.   82:     SET CHAT (ON!OFF)         ; Chat mode
  8227.   82:     SET CHLINES #             ; Specify chat window size
  8228.   82:     SET CLOCK (ON!OFF!NEW)      ; Screen clock (new -> reset time)
  8229.   82:     SET COLOR (ON!OFF)         ; Set/reset color screen
  8230.   82:     SET COMBASE <port> Nx         ; Specify base address COMx
  8231.   82:     SET COMVECTOR <port> Nx     ; Specify vector # COMx
  8232.   82: -> SET CR     (CR!CR_LF)         ; CR received as CR or CR/LF
  8233.   82: -> SET CR_IN  (CR!CR_LF)         ; CR received as CR or CR/LF
  8234.       *  SET CR_OUT (CR!CR_LF)         ; Unimplemented
  8235.   82: -> SET DATABITS (7!8)         ; Set comm parm
  8236.   82:     SET DEFAULT <attr>         ; Set menu window color
  8237.   82:     SET DBLCLICK #          ; Dbl click interval in MS
  8238.   82:     SET DIAL NAME # <string>     ; Dial dir entry name field
  8239.   82:     SET DIAL NUMB # <string>     ; Dial dir entry nunber field
  8240.   82:     SET DIAL RATE # <string>     ; Dial dir entry rate field
  8241.   82:     SET DIAL PARI # <string>     ; Dial dir entry parity field
  8242.   82:     SET DIAL DATA # <string>     ; Dial dir entry dbits field
  8243.   82:     SET DIAL STOP # <string>     ; Dial dir entry stop field
  8244.   82:     SET DIAL SCRI # <string>     ; Dial dir entry script field
  8245.   82: -> SET DISPLAY (ON!OFF)         ; PC+ 1.1 SET RDISP equivalent
  8246.   82: -> SET DLDIR <string>         ; Set d:\path for downloads
  8247.  
  8248.  
  8249. Version 2.6: 900426                           Appendices
  8250.  
  8251. COM-AND: IBM PC Communication Script Language                 Page 146
  8252.  
  8253.  
  8254. M.    Language Summary (continued)
  8255.  
  8256.  
  8257.   Page     Syntax              Comment
  8258.   ------ ------------------------------- -----------------------------
  8259.   82:     SET DOSLEVEL <number>         ; Set pgm error level for batches
  8260.   82:     SET DPREFIX <string>         ; Specify dialing prefix
  8261.   82:     SET DROPDTR (ON!OFF)         ; Set hangup method
  8262.   82:     SET DSUFFIX <string>         ; Specify dialing suffix
  8263.   82:     SET DTR (ON!OFF)         ; Raise/lower DTR to modem
  8264.   82: -> SET DUPLEX (HALF!FULL)      ; Keyboard echo
  8265.       *  SET ENQ ON             ; Unimplemented
  8266.   82:     SET ENQ (OFF!CISB)         ; Automatic CIS file up/dn, VIDTEX
  8267.   82:     SET EXIT <scriptname>         ; Script on Alt-X, BYE
  8268.   82:     SET EXQUery (ON!OFF)         ; Set exit query flag
  8269.   82:     SET FAILURE (ON!OFF)         ; Set/reset FAILURE flag (IF test)
  8270.   82:     SET FLAG [(#)] (ON!OFF)     ; Set/reset flags
  8271.   82: -> SET FLOWCTRL (ON!OFF)         ; XON/XOFF flow control
  8272.   82:     SET FOUND (ON!OFF)         ; Set/reset FOUND flag (IF test)
  8273.   82: -> SET HARDFLOW (ON!OFF)         ; RTS/CTS discipline
  8274.   82:     SET HMOUSE #             ; Set mouse horiz sensitivity
  8275.       *  SET HOSTPSWD <string>         ; Unimplemented
  8276.       *  SET INAFTER (ON!OFF)         ; Set init modem after hangup
  8277.   82:     SET KBDBUFFER (ON!OFF)      ; Keyboard display buffer
  8278.   97: -> SET KERMIT <subcommand>     ; See below
  8279.   82:     SET LD # <string>         ; LD dir entry (1-4)
  8280.   82:     SET LINKED (ON!OFF)         ; Set/reset LINKED flag (IF test)
  8281.   82:     SET MACRO # <string>         ; Macro dir entry (0-9)
  8282.   82:     SET MASK (ON!OFF)         ; 7/8 bit masking
  8283.   82:     SET MCONNECT <string>         ; Specify modem connect string
  8284.   82:     SET MDCHar <value>         ; Set modem delay char ASCII value
  8285.   82:     SET MDELAY #             ; Specify intercharacter delay
  8286.       -> SET MENUMODE (ON!OFF)         ; Turn on/off menu mode
  8287.   82:     SET MESCAPE <string>         ; Specify modem escape string
  8288.   82:     SET MHANGUP <string>         ; Specify hangup string
  8289.   82:     SET MINIT <string>         ; Specify modem init string
  8290.   82:     SET MUSIC (ON!OFF)         ; Set/reset music escape sequences
  8291.   82: -> SET PARITY (EVEN!ODD!NONE)     ; Set comm parm
  8292.   82:     SET PCJR (ON!OFF)         ; Suspend comm during disk I/O
  8293.   82: -> SET PORT (COM1!COM2!COM3!COM4)  ; Set comm parm
  8294.   82:     SET QUIET (ON!OFF)         ; Suppress bells
  8295.   82: -> SET RDELAY <number>         ; Reconnect delay, in seconds
  8296.   82:     SET RDISPLAY (ON!OFF)         ; Receive character display
  8297.   82:     SET RDMAX <number>         ; Set redial limit count
  8298.   82:     SET RECHO (ON!OFF)         ; Received character echo (back out)
  8299.   82: -> SET REMOTE (ON!OFF)         ; Set/reset remote cmd processing
  8300.  
  8301.  
  8302.  
  8303.  
  8304. Version 2.6: 900426                           Appendices
  8305.  
  8306. COM-AND: IBM PC Communication Script Language                 Page 147
  8307.  
  8308.  
  8309. M.    Language Summary (continued)
  8310.  
  8311.  
  8312.   Page     Syntax              Comment
  8313.   ------ ------------------------------- -----------------------------
  8314.   82:     SET RLEOK (ON!OFF)         ; Allow/disallow RLE's
  8315.   82:     SET RMODE (ASCII!BINARY)     ; RGET implements BS/rubout
  8316.   82:     SET RTS (ON!OFF)         ; Set/reset modem RTS bit
  8317.   82:     SET RTSD (ON!OFF)         ; Set/reset modem RTS discipline
  8318.   82:     SET RTSF (ON!OFF)         ; Set/reset RTS flow control
  8319.       *  SET SCROLL (ON!OFF)         ; Unimplemented
  8320.       *  SET SHELLPSWD <string>      ; Unimplemented
  8321.   82:     SET SILENCE <seconds>         ; Set ON SILENCE duration
  8322.   82:     SET SLOWOUT (ON!OFF)         ; Set slow writes
  8323.   82: -> SET SOFTFLOW             ; XON/XOFF flow control
  8324.       *  SET SOUND (ON!OFF)         ; Unimplemented
  8325.   82: -> SET STOPBITS (1!2)         ; Comm parm
  8326.   82:     SET SUCCESS (ON!OFF)         ; Set/reset SUCCESS flag (IF test)
  8327.   82: -> SET SWRITE (BIOS!DIRECT!DOS)     ; Screen I/O update method
  8328.   82:     SET TEXT <attr>         ; Set text window color
  8329.   82:     SET TIMER [(#)]         ; Set timer number (#) to now
  8330.   82: -> SET TRANSLATE (ON!OFF)      ; Toggle translation
  8331.   82:     SET TTHRU (ON!OFF)         ; Set typethrough unconditionally
  8332.   82:     SET TUNE <string>         ; Set alarm tune using string
  8333.       *  SET TXPACE <number>         ; Implemented as SET ASCII CHARPACE
  8334.   82:     SET VMOUSE #             ; Set mouse vert sensitivity
  8335.   82:     SET WAITFOR (ON!OFF)         ; Set/reset WAITFOR flag
  8336.   82:     SET WATCHDOG <secs>         ; Set XOFF timeout in seconds
  8337.       *  SET WRAP (ON!OFF)         ; Unimplemented
  8338.   82:     SET WAITFOR (ON!OFF)         ; Set/reset WAITFOR flag (IF test)
  8339.   82:     SET XSUI <number>         ; Set xfer screen update interval
  8340.   99:     SET ZMODEM <subcommand>     ; See below
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.  
  8353.  
  8354.  
  8355.  
  8356.  
  8357.  
  8358.  
  8359. Version 2.6: 900426                           Appendices
  8360.  
  8361. COM-AND: IBM PC Communication Script Language                 Page 148
  8362.  
  8363.  
  8364. M.    Language Summary (continued)
  8365.  
  8366.  
  8367.   Page     Syntax              Comment
  8368.   ------ ------------------------------- -----------------------------
  8369.   96: -> SET ASCII BLANKEX (ON!OFF)     ; Blank line expansion ASCII send
  8370.   96: -> SET ASCII CHARPACE <number>     ; Time in MS between characters
  8371.       *  SET ASCII DN_CR (CR!CR_LF!STRIP); Unimplemented
  8372.       *  SET ASCII DN_LF (CR!CR_LF!STRIP); Unimplemented
  8373.   96: -> SET ASCII ECHO (ON!OFF)     ; Force Echo during SENDFILE ASCII
  8374.   96:     SET ASCII FLOW (ON!OFF)     ; ASCII send flow control used
  8375.   96: -> SET ASCII LINEPACE <number>     ; Delay between lines (1/10ths sec)
  8376.   96: -> SET ASCII PACECHAR <number>     ; Prompt from host (Decimal value)
  8377.   96:     SET ASCII QUIET (ON!OFF)     ; Disable alarm after SENDFILE ASCII
  8378.   96:     SET ASCII TABEX (ON!OFF)     ; Tab expansion ASCII send
  8379.       *  SET ASCII UP_CR (CR!CR_LF!STRIP); Unimplemented
  8380.   96: -> SET ASCII UP_LF (LF!CR_LF!STRIP); CR_LF unimplemented
  8381.   96:     SET ASCII UP_Z (STRIP!SEND)     ; Terminate ASCII send on ctl-z
  8382.  
  8383.  
  8384.   97: -> SET KERMIT 8QUOTE <number>     ; Decimal ascii value
  8385.   97: -> SET KERMIT BLOCKCHECK (1!2!3)     ; Block check character length
  8386.   97: -> SET KERMIT CQUOTE <number>     ; Decimal ascii value
  8387.   97: -> SET KERMIT EOLCHAR <number>     ; Decimal ascii value
  8388.       *  SET KERMIT HANDSHAKE <number>     ; Decimal ascii value
  8389.       *  SET KERMIT FILETYPE (TEXT!BINARY); Unimplemented
  8390.   97:     SET KERMIT MARK <number>     ; Decimal ascii value
  8391.       *  SET KERMIT PACKSIZE <number>     ; Decimal ascii value
  8392.   97: -> SET KERMIT PADCHAR <number>     ; Decimal ascii value
  8393.   97: -> SET KERMIT PADNUM number     ; Number of pads
  8394.   97:     SET KERMIT REPEAT <number>     ; Decimal ascii value
  8395.   97:     SET KERMIT WINDOW <number>     ; Decimal ascii value
  8396.  
  8397.  
  8398.   99:     SET ZMODEM AUTO (ON!OFF)     ; Auto downloading
  8399.   99:     SET ZMODEM BLOCK <number>     ; Decimal ascii value
  8400.   99:     SET ZMODEM RECOVER (ON!OFF)     ; Download recovery
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.  
  8413.  
  8414. Version 2.6: 900426                           Appendices
  8415.