home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / COMM / MISC / COMMO52.ZIP / MACRO.DOC < prev    next >
Encoding:
Text File  |  1992-03-07  |  128.9 KB  |  4,060 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                 ____________
  10.  
  11.                                 {COMMO} (tm)
  12.                                 ____________
  13.  
  14.  
  15.                    "A New Standard in Telecommunications"
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                      by
  26.  
  27.                               Fred P. Brucker
  28.  
  29.                             Post Office Box 9103
  30.                             Santa Rosa, CA 95405
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                           Macro Programming Guide
  38.  
  39.  
  40.  
  41.  
  42.                                 Release 5.2
  43.  
  44.                                March 7, 1992
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.         (C)Copyright 1989,1992  Fred P. Brucker  All Rights Reserved
  59.  
  60.  
  61.  
  62.  
  63.  
  64.      The {COMMO} program and associated on-disk documentation are the
  65.      property of the author and may not be sold without permission. 
  66.      They may be freely distributed, unaltered and as a unit, via
  67.      electronic bulletin board systems.  Permission to distribute on
  68.      diskette or in any other manner must be obtained in writing.  See
  69.      the file LICENSES for additional licensing and distribution
  70.      details.
  71.  
  72.  
  73.      The author does not guarantee this program to be free from
  74.      defects and may not be held responsible for loss caused by such. 
  75.      Your use of this program constitutes your acceptance of these
  76.      terms.
  77.  
  78.  
  79.  
  80.  
  81.      DESQview is a trademark of Quarterdeck Office Systems
  82.      OmniView is a trademark of Sunny Hill Software
  83.      DoubleDOS is a trademark of SoftLogic Solutions, Inc.
  84.      HS/Link is a product of Samuel H. Smith
  85.      DSZ and GSZ are products of Omen Technology Inc.
  86.      MPt is a product of Matthew Thomas
  87.      LIST is a product of Vernon D. Buerg
  88.      The IBM PC is a product of IBM Corp.
  89.      MS-DOS is a trademark of MicroSoft Corp.
  90.  
  91.  
  92.  
  93.  
  94.         (C)Copyright 1989,1992  Fred P. Brucker  All Rights Reserved
  95.  
  96.  
  97.  
  98.                      ================================
  99.                      {COMMO} Registration Information
  100.                      ================================
  101.  
  102.   {COMMO} is a "SHAREWARE" product.  You are entitled to evaluate it for
  103.   30 days.  If it suits your needs and you would like to continue using
  104.   it, then you must pay the licensing fee.  Please use the REGISTRATION
  105.   FORM on the next page.
  106.  
  107.   When you REGISTER you will be licensed to use all future releases of
  108.   {COMMO}.  You will never have to pay an "update" charge.  You will also
  109.   receive instructions for removing the Shareware Notice at program
  110.   startup.
  111.  
  112.   My (voice) TELEPHONE NUMBER for inquiries and support for registered
  113.   users is (707) 573-1065.  Please restrict calls to business hours
  114.   (Mon-Fri, 9am-5pm, Pacific time).
  115.  
  116.   Registered users will also receive priority support on Bulletin Boards,
  117.   CompuServe and GEnie (see READ.ME).
  118.  
  119.   Call or write for pricing information on MULTI-USER (site) and
  120.   DISTRIBUTION licenses.  Discounts are given on quantities greater than
  121.   10.  See the file LICENSES for licensing and distribution details.
  122.  
  123.   All prices shown are US DOLLARS.  Please remit US FUNDS on US BANK only.
  124.   NET 30 TERMS will be accepted on purchase orders totalling $100.00 or
  125.   more.
  126.  
  127.   PAYMENT OPTIONS:
  128.  
  129.   1) Payment by CHECK or MONEY ORDER:  make payable to FRED P. BRUCKER.
  130.      Mail the Registration Form and payment to the address below.
  131.  
  132.   2) Payment by CREDIT CARD:  fill in the credit card information at the
  133.      bottom of the Registration Form.  The following cards are accepted:
  134.  
  135.        VISA, MASTERCARD, CARTE BLANCHE, DINERS CLUB, DISCOVER, JCB.
  136.  
  137.      You can mail the Registration Form to the address below or:
  138.  
  139.        Order by phone: (707) 573-1065, Mon-Fri, 9am-5pm, Pacific time.
  140.          Have your credit card ready when you call.
  141.  
  142.        Order by E-mail on CompuServe (71021,356) or GEnie (F.BRUCKER1).
  143.          Upload the completed Registration Form as a message.
  144.  
  145.      The company name on the charge will be "New Standard Software."
  146.  
  147.  
  148.                 SEND TO:   Fred P. Brucker
  149.                            Post Office Box 9103
  150.                            Santa Rosa, CA 95405
  151.  
  152.  
  153.  
  154.                {COMMO} 5.2 SINGLE USER REGISTRATION FORM
  155.  
  156.   Name     _______________________________________________________________
  157.  
  158.   Company name (if company address)   ____________________________________
  159.  
  160.   Address  _______________________________________________________________
  161.  
  162.            _______________________________________________________________
  163.  
  164.            _______________________________________________________________
  165.  
  166.  
  167.   {COMMO} single user license, SPECIAL PACKAGE .... $50.00    $ __________
  168.     Includes: (1) Printed, bound, indexed manual.
  169.               (2) Latest release on diskette plus utilities
  170.                   (COMMOPNS, MOSTHOST, CMC, etc., see READ.ME).
  171.  
  172.   {COMMO} single user license, with DISKETTE ...... $40.00    $ __________
  173.  
  174.   {COMMO} single user LICENSE alone ............... $35.00    $ __________
  175.  
  176.   Registered users may order PRINTED MANUAL only .. $20.00    $ __________
  177.     Limit of one per license.  Your serial no. _________
  178.  
  179.   Registered users may order DISKETTE only ......... $5.00    $ __________
  180.     Limit of one per license.  Your serial no. _________
  181.  
  182.   ALL DISK ORDERS -  Choose format: 5.25" ____ 3.5" ____
  183.                      Current (latest) release       ____
  184.                      Next release (when available)  ____
  185.  
  186.                                                   Subtotal    $ __________
  187.  
  188.                   California residents add sales tax, 7.5%    $ __________
  189.                     (No tax when ordering license alone)
  190.  
  191.   Special Package or Manual order, add SHIPPING:
  192.                          USA/Canada/Mexico ......... $3.00
  193.                          All other countries ...... $10.00    $ __________
  194.  
  195.                                                      Total    $ __________
  196.  
  197.   Payment method:  Check__  Money order__  Visa__  MasterCard__  PO__
  198.                    Carte Blanche__  Diners Club__  Discover__  JCB__
  199.  
  200.      CREDIT CARD INFORMATION:
  201.  
  202.      Card No. ________  ________  ________  ________  Expires ____/____
  203.  
  204.      Cardholder signature _____________________________________________
  205.  
  206.      Cardholder name __________________________________________________
  207.  
  208.      Daytime telephone  (_____) _____ _______
  209.  
  210.  
  211.  
  212.                    {COMMO} (tm)  Macro Programming Guide             5
  213.  
  214.  
  215.      ========
  216.      Contents
  217.      ========
  218.  
  219.  
  220.      Programming {COMMO} Macros  . . . . . . . . . . . . . . . . .   8
  221.           Macro Structure  . . . . . . . . . . . . . . . . . . . .   8
  222.           Macro Functions  . . . . . . . . . . . . . . . . . . . .   9
  223.           Macro Labels . . . . . . . . . . . . . . . . . . . . . .  11
  224.           Macro Variables  . . . . . . . . . . . . . . . . . . . .  12
  225.           How to Use Variables . . . . . . . . . . . . . . . . . .  13
  226.           Reserved Variables . . . . . . . . . . . . . . . . . . .  14
  227.           Executing Macros . . . . . . . . . . . . . . . . . . . .  15
  228.           Additional Macro Execution Rules . . . . . . . . . . . .  15
  229.           Cancelling a Macro . . . . . . . . . . . . . . . . . . .  16
  230.  
  231.      Description of Functions (Alphabetical) . . . . . . . . . . .  17
  232.           ABAUd  . . . . . . . . . . . . . . . . . . . . . . . . .  17
  233.           ALARm  . . . . . . . . . . . . . . . . . . . . . . . . .  17
  234.           ASCIiup  . . . . . . . . . . . . . . . . . . . . . . . .  18
  235.           AUTO . . . . . . . . . . . . . . . . . . . . . . . . . .  19
  236.           BEEP . . . . . . . . . . . . . . . . . . . . . . . . . .  20
  237.           BREAk  . . . . . . . . . . . . . . . . . . . . . . . . .  20
  238.           CALL . . . . . . . . . . . . . . . . . . . . . . . . . .  20
  239.           CALOok . . . . . . . . . . . . . . . . . . . . . . . . .  21
  240.           CAPMode  . . . . . . . . . . . . . . . . . . . . . . . .  21
  241.           CAPTure  . . . . . . . . . . . . . . . . . . . . . . . .  22
  242.           CHATmode . . . . . . . . . . . . . . . . . . . . . . . .  22
  243.           CLEAr  . . . . . . . . . . . . . . . . . . . . . . . . .  22
  244.           COMPare  . . . . . . . . . . . . . . . . . . . . . . . .  23
  245.           CURSor . . . . . . . . . . . . . . . . . . . . . . . . .  24
  246.           DECRement  . . . . . . . . . . . . . . . . . . . . . . .  24
  247.           DIAL . . . . . . . . . . . . . . . . . . . . . . . . . .  24
  248.           DISPlay  . . . . . . . . . . . . . . . . . . . . . . . .  26
  249.           DOORway  . . . . . . . . . . . . . . . . . . . . . . . .  27
  250.           DPARms . . . . . . . . . . . . . . . . . . . . . . . . .  27
  251.           EDIT . . . . . . . . . . . . . . . . . . . . . . . . . .  28
  252.           ELAPse . . . . . . . . . . . . . . . . . . . . . . . . .  29
  253.           EXECute  . . . . . . . . . . . . . . . . . . . . . . . .  29
  254.                Using the Direct Switch: exec-D . . . . . . . . . .  31
  255.                EXECute Preview Mode  . . . . . . . . . . . . . . .  31
  256.           EXIT . . . . . . . . . . . . . . . . . . . . . . . . . .  32
  257.           GETString  . . . . . . . . . . . . . . . . . . . . . . .  32
  258.           GOLOok . . . . . . . . . . . . . . . . . . . . . . . . .  34
  259.           GOTO . . . . . . . . . . . . . . . . . . . . . . . . . .  35
  260.           HANGup . . . . . . . . . . . . . . . . . . . . . . . . .  35
  261.           HELP . . . . . . . . . . . . . . . . . . . . . . . . . .  35
  262.           HFLOw  . . . . . . . . . . . . . . . . . . . . . . . . .  35
  263.           HOLD . . . . . . . . . . . . . . . . . . . . . . . . . .  36
  264.           IFCArrier  . . . . . . . . . . . . . . . . . . . . . . .  36
  265.           IFCOndition  . . . . . . . . . . . . . . . . . . . . . .  37
  266.           IFERrorlevel . . . . . . . . . . . . . . . . . . . . . .  38
  267.  
  268.  
  269.  
  270.                    {COMMO} (tm)  Macro Programming Guide             6
  271.  
  272.  
  273.           IFEXist  . . . . . . . . . . . . . . . . . . . . . . . .  39
  274.           INCRement  . . . . . . . . . . . . . . . . . . . . . . .  39
  275.           INITmodem  . . . . . . . . . . . . . . . . . . . . . . .  40
  276.           INPUt  . . . . . . . . . . . . . . . . . . . . . . . . .  40
  277.           INSTring . . . . . . . . . . . . . . . . . . . . . . . .  41
  278.           LENGth . . . . . . . . . . . . . . . . . . . . . . . . .  41
  279.           LIGHts . . . . . . . . . . . . . . . . . . . . . . . . .  42
  280.           LOCAlecho  . . . . . . . . . . . . . . . . . . . . . . .  42
  281.           LOOKfor  . . . . . . . . . . . . . . . . . . . . . . . .  42
  282.           MACLoad  . . . . . . . . . . . . . . . . . . . . . . . .  44
  283.           MACRo  . . . . . . . . . . . . . . . . . . . . . . . . .  45
  284.           MARK . . . . . . . . . . . . . . . . . . . . . . . . . .  46
  285.           NOCArrier  . . . . . . . . . . . . . . . . . . . . . . .  47
  286.           NOOP . . . . . . . . . . . . . . . . . . . . . . . . . .  47
  287.           PARMs  . . . . . . . . . . . . . . . . . . . . . . . . .  47
  288.           PASSword . . . . . . . . . . . . . . . . . . . . . . . .  48
  289.           PAUSe  . . . . . . . . . . . . . . . . . . . . . . . . .  48
  290.           POPStack . . . . . . . . . . . . . . . . . . . . . . . .  49
  291.           PRINtlog . . . . . . . . . . . . . . . . . . . . . . . .  49
  292.           PUSHstack  . . . . . . . . . . . . . . . . . . . . . . .  49
  293.           RCLOse . . . . . . . . . . . . . . . . . . . . . . . . .  50
  294.           READ . . . . . . . . . . . . . . . . . . . . . . . . . .  51
  295.           RETUrn . . . . . . . . . . . . . . . . . . . . . . . . .  51
  296.           ROPEn  . . . . . . . . . . . . . . . . . . . . . . . . .  52
  297.           RTRAn  . . . . . . . . . . . . . . . . . . . . . . . . .  52
  298.           RXMOdem  . . . . . . . . . . . . . . . . . . . . . . . .  54
  299.           SCREen . . . . . . . . . . . . . . . . . . . . . . . . .  55
  300.           SCROllback . . . . . . . . . . . . . . . . . . . . . . .  55
  301.           SEND . . . . . . . . . . . . . . . . . . . . . . . . . .  55
  302.           SETEsc . . . . . . . . . . . . . . . . . . . . . . . . .  56
  303.           SETGet . . . . . . . . . . . . . . . . . . . . . . . . .  57
  304.           SETLook  . . . . . . . . . . . . . . . . . . . . . . . .  58
  305.           SETVariable  . . . . . . . . . . . . . . . . . . . . . .  60
  306.           SHELl  . . . . . . . . . . . . . . . . . . . . . . . . .  61
  307.           SFLOw  . . . . . . . . . . . . . . . . . . . . . . . . .  61
  308.           SOUNd  . . . . . . . . . . . . . . . . . . . . . . . . .  62
  309.           SPDCtrl  . . . . . . . . . . . . . . . . . . . . . . . .  62
  310.           SPOCtrl  . . . . . . . . . . . . . . . . . . . . . . . .  63
  311.           STATusline . . . . . . . . . . . . . . . . . . . . . . .  63
  312.           STOP . . . . . . . . . . . . . . . . . . . . . . . . . .  63
  313.           STRAn  . . . . . . . . . . . . . . . . . . . . . . . . .  64
  314.           SUBString  . . . . . . . . . . . . . . . . . . . . . . .  65
  315.           SXMOdem  . . . . . . . . . . . . . . . . . . . . . . . .  66
  316.           TOGGles  . . . . . . . . . . . . . . . . . . . . . . . .  66
  317.           UNMArk . . . . . . . . . . . . . . . . . . . . . . . . .  67
  318.           VTCUr  . . . . . . . . . . . . . . . . . . . . . . . . .  67
  319.           VTPAd  . . . . . . . . . . . . . . . . . . . . . . . . .  67
  320.           WCLOse . . . . . . . . . . . . . . . . . . . . . . . . .  68
  321.           WOPEn  . . . . . . . . . . . . . . . . . . . . . . . . .  68
  322.           WRITe  . . . . . . . . . . . . . . . . . . . . . . . . .  69
  323.  
  324.      Appendix A   Table of {COMMO} Key-labels  . . . . . . . . . .  70
  325.  
  326.  
  327.  
  328.                    {COMMO} (tm)  Macro Programming Guide             7
  329.  
  330.  
  331.           Enhanced Keyboard Key-labels . . . . . . . . . . . . . .  71
  332.  
  333.      Appendix B   List of Reserved Variables . . . . . . . . . . .  72
  334.  
  335.      Appendix C   Macro Functions Listed by Class  . . . . . . . .  73
  336.  
  337.  
  338.  
  339.                    {COMMO} (tm)  Macro Programming Guide             8
  340.  
  341.  
  342.      ==========================
  343.      Programming {COMMO} Macros
  344.      ==========================
  345.  
  346.      IMPORTANT!  Please read the next few pages before you attempt to
  347.      write any macros!  The rules for writing {COMMO} macros are few
  348.      in number, but must be followed carefully.  Examples of more
  349.      complex macro programming are given in the sample Macro File
  350.      COMMO.MAC, in the supplied file SAMPLES.MAC and in the Host Mode
  351.      and Guide macros.
  352.  
  353.      The following sections assume familiarity with {COMMO}'s key
  354.      commands and with other features of the program.  Since many
  355.      macro functions have corresponding key commands, duplicate
  356.      explanations will not be given here.  Refer to the description of
  357.      the key command in the User Guide and Reference.
  358.  
  359.      {COMMO}'s Macro File may contain any number of macros.  The only
  360.      size limitation on the file is that the Dialing Directory and
  361.      Macro File combined must total 64k bytes or less.
  362.  
  363.      Macros are "interpreted," which implies the following:
  364.  
  365.           (1)  Macros are not processed until they are executed.
  366.  
  367.           (2)  Only macros within the currently loaded Macro File are
  368.                available for use.
  369.  
  370.           (3)  Macros added or modified with the Internal Editor are
  371.                available immediately.
  372.  
  373.      Alternate Macro Files may be loaded using the MACLoad function
  374.      (the original file is replaced and may be reloaded at a later
  375.      time).
  376.  
  377.  
  378.      Macro Structure
  379.      ===============
  380.  
  381.      Macros consist of a series of items enclosed in curly braces. 
  382.      Items may be placed on the same line or on as many lines as
  383.      desired.  The file is entirely free-form.  Lines may be up to 255
  384.      characters in length and all text outside the curly braces is
  385.      ignored.
  386.  
  387.      There are two types of items: "functions" and "labels."
  388.  
  389.           Functions are action items.  Some are equivalent to {COMMO}
  390.           key commands, such as DIAL, while others are unique to the
  391.           macro language, such as SETVariable.
  392.  
  393.  
  394.  
  395.                    {COMMO} (tm)  Macro Programming Guide             9
  396.  
  397.  
  398.           Labels are macro entry points and may be placed anywhere
  399.           within the Macro File.
  400.  
  401.  
  402.      Macro Functions
  403.      ===============
  404.  
  405.      Each macro function is described in detail later in this
  406.      document.  See also Appendix C "Macro Functions Listed by Class."
  407.  
  408.  
  409.      The general form of any macro function is:
  410.  
  411.           {name-switches arg1,arg2,...,argn}
  412.  
  413.                name      The function name describes the action to be
  414.                          performed and consists of four or more
  415.                          characters. Only the first four are
  416.                          significant and case is ignored.
  417.  
  418.                switches  These are used to alter the operation of a
  419.                          function.  Each switch is a single letter and
  420.                          may be followed by a numeric value, usually
  421.                          "1" or "0" to indicate "yes" or "no"
  422.                          respectively.
  423.  
  424.                          Switches have default interpretations when
  425.                          the numeric value is omitted, or when the
  426.                          switch is not present.
  427.  
  428.                          Switches must be separated from the name with
  429.                          a hyphen (no intervening spaces).  They may
  430.                          be upper or lower case.
  431.  
  432.                          See individual function descriptions for
  433.                          details (note that only certain functions
  434.                          have switches).
  435.  
  436.                args      Arguments follow the function name and
  437.                          switches separated by a SINGLE SPACE. 
  438.                          Individual arguments are separated with
  439.                          commas and may contain no extraneous spaces
  440.                          (all spaces are significant).
  441.  
  442.      NOTE:  Curly braces may be represented within macro functions by
  443.      using ^( for { and ^) for }.
  444.  
  445.      Examples:
  446.  
  447.           {send Hi, how are you?}
  448.  
  449.  
  450.  
  451.                    {COMMO} (tm)  Macro Programming Guide            10
  452.  
  453.  
  454.                This function sends the string "Hi, how are you?" to
  455.                the modem.  SEND has only one argument -- the string to
  456.                send out.  Since the string is the last argument, it
  457.                may contain commas and spaces.  Quotes are not used to
  458.                define strings.
  459.  
  460.           {ifcon-LE label1,label2}
  461.  
  462.                The IFCOndition function tests for conditions set by
  463.                other functions, such as COMPare.  Here two switches
  464.                are present, telling {COMMO} to test for less than or
  465.                equal:
  466.  
  467.                     L    Test for "less than."
  468.                     E    Test for "equal."
  469.  
  470.                The two arguments are labels to GOTO depending on the
  471.                conditions.
  472.  
  473.                Notice that "name-switches" may be written in a number
  474.                of different ways:
  475.  
  476.                     ifco-LE  ifcondition-EL  ifcond-LE
  477.  
  478.           {asci-S0E1 pathname}
  479.  
  480.                The ASCII Upload function will send the file indicated
  481.                by "pathname."  The switches override current settings
  482.                and tell {COMMO}:
  483.  
  484.                     S0   Do NOT strip linefeeds.
  485.                     E1   DO expand blank lines (may also be written
  486.                          "E").
  487.  
  488.           {sound}   {sound yes}
  489.  
  490.                The first function will TOGGLE Master Sound ON/OFF
  491.                (since there is no argument).  The second will turn the
  492.                sound ON.
  493.  
  494.  
  495.      One very important function is the STOP function.  It is used to
  496.      terminate macro processing and may appear in either its long form
  497.      or short form:
  498.  
  499.           ... {stop}          long form
  500.           ... {}              short form
  501.  
  502.      Macro processing continues until a STOP function is executed.  Be
  503.      sure to use one or processing will continue into the next macro!
  504.  
  505.  
  506.  
  507.                    {COMMO} (tm)  Macro Programming Guide            11
  508.  
  509.  
  510.      Macro Labels
  511.      ============
  512.  
  513.      Labels are identifiers consisting of one or more characters. 
  514.      When a label is defined, it must be preceded by a colon. 
  515.      References to labels, such as {goto label}, do not require the
  516.      colon.
  517.  
  518.      IMPORTANT!  {COMMO} always searches for labels from the beginning
  519.      of the Macro File.  This means that if a label is duplicated
  520.      within the file, the first occurrence will be used.
  521.  
  522.      Only the first eight characters in a label are significant.  Case
  523.      is ignored.  All characters are allowed in labels except the
  524.      following:
  525.  
  526.           colon          ":"
  527.           space          " "
  528.           comma          ","
  529.           slash          "/"
  530.           curly braces   "{" or "}"
  531.  
  532.      Examples:
  533.  
  534.           {:mailrun} {call login} ...
  535.  
  536.           {:start-here} {:another.entry} {send Begin now!} ...
  537.  
  538.  
  539.      A number of three character labels are reserved and are called
  540.      "key-labels."  When the corresponding key is pressed from the
  541.      Terminal Screen, {COMMO} will look for the key-label in the
  542.      current Macro File.  If the key-label is found, macro processing
  543.      will begin at that location.
  544.  
  545.      Any default key assignment may be overridden using a key-label. 
  546.      For example, pressing Alt-D normally enters the Dialing
  547.      Directory.  But suppose this line is in the Macro File:
  548.  
  549.           {:ald} {clear} {}
  550.  
  551.      Now pressing Alt-D will clear the screen.
  552.  
  553.      See Appendix A "Table of {COMMO} Key-labels" for a complete list
  554.      of keys that may be assigned.
  555.  
  556.  
  557.  
  558.                    {COMMO} (tm)  Macro Programming Guide            12
  559.  
  560.  
  561.      Macro Variables
  562.      ===============
  563.  
  564.      {COMMO} maintains a String Variable Space in which variables
  565.      appear in the form:
  566.  
  567.           name,string
  568.  
  569.                name      An identifier consisting of one or more
  570.                          characters of which only the first eight are
  571.                          significant.  Case is ignored.  The following
  572.                          are the ONLY valid characters that my be used
  573.                          in a variable name:
  574.  
  575.                               "A" through "Z"
  576.                               "a" through "z"
  577.                               "0" through "9"
  578.                               "_" underline.
  579.  
  580.                          All other characters will terminate the name.
  581.  
  582.                string    A text string.  The string must not contain
  583.                          any control characters below ASCII 28.  Null
  584.                          strings (0 characters) do not appear in
  585.                          variable space.
  586.  
  587.                          Strings consisting of only the digits 0-9 and
  588.                          representing a decimal number from 0 to 65535
  589.                          are also numeric variables (there is no other
  590.                          difference between string and numeric
  591.                          variables).
  592.  
  593.                          The maximum length of strings is 240
  594.                          characters.
  595.  
  596.      The String Variable Space may be viewed from within the Macro
  597.      Processor window by pressing "V".  The amount of unused string
  598.      space is shown at the bottom of the screen.
  599.  
  600.      Once a variable is defined, it remains in String Variable Space
  601.      until it is redefined or deleted (set to null).  Therefore
  602.      variables should be deleted or re-used to prevent String Variable
  603.      Space from becoming full.
  604.  
  605.  
  606.  
  607.                    {COMMO} (tm)  Macro Programming Guide            13
  608.  
  609.  
  610.      How to Use Variables
  611.      ====================
  612.  
  613.      {COMMO} variables may be used in macro functions and also in the
  614.      telephone number field of the Dialing Directory.  See "Alt-D 
  615.      Dialing Directory" in the User Guide and Reference for this
  616.      latter usage.
  617.  
  618.      When a variable name appears within a function, the string
  619.      assigned to the name is substituted for the name.  If the
  620.      variable is null, then the name is replaced with 0 characters. 
  621.      {COMMO} will expand the variables in a function before processing
  622.      it.
  623.  
  624.      In order to distinguish variable names, they must be preceded
  625.      with a percent sign "%" (use two percent signs if a percent sign
  626.      is needed in the data).
  627.  
  628.      The end of the variable name is indicated with another "%" or
  629.      with the first character that is not allowed in a name (see
  630.      above).
  631.  
  632.  
  633.      A variable definition example:
  634.  
  635.           {setvar animal,Elephant} or {setvar %animal,Elephant}
  636.  
  637.                Notice that the "%" is not required (but is permitted)
  638.                when the variable name is the first argument of a
  639.                function that defines, modifies or tests the value of a
  640.                variable.  Other such functions include INPUt,
  641.                GETString, INCRement, DECRement, COMPare, SUBString,
  642.                INSTring, READ.
  643.  
  644.                If the variable name in this situation needs to be a
  645.                variable, then use two percent signs:
  646.  
  647.           {setv %%animal,Elephant}
  648.  
  649.  
  650.      Variable usage examples:
  651.  
  652.           {setvar animal,Elephant}
  653.           {send %animal}           Sends "Elephant" to the modem.
  654.           {send animal}            Sends "animal".
  655.           {send %animal%s are large animals}
  656.                                    Sends "Elephants are large
  657.                                    animals".  Note that the trailing
  658.                                    "%" is required here.
  659.  
  660.           {setvar animal,Elephant}
  661.           {setv creature,animal}
  662.  
  663.  
  664.  
  665.                    {COMMO} (tm)  Macro Programming Guide            14
  666.  
  667.  
  668.           {send creature}          Sends "creature". 
  669.           {send %creature}         Sends "animal". 
  670.           {setv %%creature,Giraffe}
  671.           {send %animal}           Sends "Giraffe".
  672.  
  673.  
  674.      IMPORTANT!  Variables may NOT be substituted within the function
  675.      name or switches.  They may be substituted anywhere else, even
  676.      for the commas separating arguments.
  677.  
  678.  
  679.      Reserved Variables
  680.      ==================
  681.  
  682.      Certain variables have fixed names so that {COMMO} can find them
  683.      whenever they are needed.  The names of these variables begin
  684.      with an underline character "_".  There are two types of reserved
  685.      variables: "user-defined" and "built-in" (see Appendix B "List of
  686.      Reserved Variables" for a complete list).
  687.  
  688.      USER-DEFINED reserved variables are defined in the same way that
  689.      you define ordinary variables -- in the Setup File using SET, or
  690.      in a macro using functions such as SETVariable, INPUt, etc. 
  691.      These variables define strings used by certain program features. 
  692.      For example, the pathname of the Usage Log is defined in the
  693.      Setup File as follows:
  694.  
  695.           {set _uselog,c:\commo\commo.log}
  696.  
  697.      BUILT-IN variables are defined by {COMMO} based on current system
  698.      parameters.  Examples are:
  699.  
  700.           _cap      Current Capture File pathname
  701.           _tim      Full time, hh:mm xm (am or pm)
  702.  
  703.      Any variable that starts with the same four characters as a
  704.      built-in variable ("_" plus the next three) will be considered
  705.      the same variable.  For example "_pas" may be written "_password"
  706.      and "_yea" may be written "_year".
  707.  
  708.      {COMMO} will always search String Variable Space first when
  709.      looking up the value of any variable.  This allows built-in
  710.      variables to be overridden, but only when using their four
  711.      character minimum names.  For example, to override the serial
  712.      port number, you must use "_por", not "_port".
  713.  
  714.      See Appendix B for a complete list of reserved variables.
  715.  
  716.  
  717.  
  718.                    {COMMO} (tm)  Macro Programming Guide            15
  719.  
  720.  
  721.      Executing Macros
  722.      ================
  723.  
  724.      Macro execution may be started in any of the following ways:
  725.  
  726.      1)   Open the Macro Processor window by pressing Alt-M.  Position
  727.           the Selector Bar at the desired starting point and press
  728.           [Enter].  The Macro Processor will begin processing at the
  729.           first macro label or function on the line.
  730.  
  731.           NOTE:  Macros started with the Selector Bar do not need
  732.           macro labels and may be started at any point within the
  733.           macro.
  734.  
  735.      2)   If a macro label is also a key-label, then you may press
  736.           that key from the Terminal Screen.  Note that if the same
  737.           key-label appears more than once, the first occurrence will
  738.           be used.
  739.  
  740.      3)   A macro may be linked to a Dialing Directory entry (Linked
  741.           Macro).  In this case {COMMO} will GOTO the macro when a
  742.           connection is established with that system (or optionally
  743.           CALL it, see the DIAL function).
  744.  
  745.      4)   A startup macro may be specified in the Setup File using the
  746.           "{mac=label}" item.
  747.  
  748.      5)   A startup macro may be specified on the command line with
  749.           the switch "/:label".  This will override the Setup File
  750.           macro.
  751.  
  752.      6)   A macro may be an argument of another function such as CALL,
  753.           GOTO, DIAL or SETLook (these are detailed in a later
  754.           section).
  755.  
  756.      Some macro functions show their current action on the Status Line
  757.      at the bottom of the screen.  In addition, a "face" character in
  758.      the middle of the Status Line indicates that a macro is
  759.      executing.
  760.  
  761.  
  762.      Additional Macro Execution Rules
  763.      ================================
  764.  
  765.      ASCII keys may be typed to the serial port during long functions
  766.      (LOOKfor, GETString, PAUSe, HOLD, etc.).
  767.  
  768.      The Macro Processor will execute functions in order until one of
  769.      the following conditions occurs:
  770.  
  771.      1)   A CALL, GOTO, RETURn, STOP, EXIT, etc. is encountered.
  772.  
  773.  
  774.  
  775.                    {COMMO} (tm)  Macro Programming Guide            16
  776.  
  777.  
  778.      2)   Control is transferred to an alternate macro from certain
  779.           functions when a special condition occurs.  An example of
  780.           this is the SETLook function.  The alternate will execute
  781.           when a subsequent LOOKfor times out.
  782.  
  783.      3)   A macro error occurs.  This will bring up the Macro
  784.           Processor window with the Selector Bar on the problem line. 
  785.           The macro will be terminated.
  786.  
  787.      4)   The end of the Macro File is reached.
  788.  
  789.  
  790.      Cancelling a Macro
  791.      ==================
  792.  
  793.      The [Esc] key is used to terminate macro processing.  To send an
  794.      <esc> code (ASCII 27) to the remote during macro execution
  795.      (without terminating the macro), press Ctrl-[ (Ctrl + left
  796.      bracket).
  797.  
  798.      Current function execution may be terminated by pressing
  799.      [Ctrl-Break].  For example, this can be used to terminate a
  800.      LOOKfor, PAUSe or HOLD prematurely.  Macro processing will
  801.      advance to the next function.
  802.  
  803.      If a macro contains a function that brings up a {COMMO} window
  804.      (Dialing Directory, Capture File Options, etc.), then [Esc] will
  805.      exit the window and processing continues with the next function. 
  806.      To terminate macro processing from a window, press [Ctrl-Break].
  807.  
  808.      NOTE:  The SETEsc function may be used to help prevent accidental
  809.      termination of macros.
  810.  
  811.  
  812.  
  813.                    {COMMO} (tm)  Macro Programming Guide            17
  814.  
  815.  
  816.      =======================================
  817.      Description of Functions (Alphabetical)
  818.      =======================================
  819.  
  820.      The purpose of this section is to show the syntax of each
  821.      function and the meaning of its arguments through examples.  All
  822.      functions are listed here, but details on functions which are
  823.      also default key commands are found in The User Guide and
  824.      Reference under "{COMMO} Key Commands."
  825.  
  826.      Function names are shown with their four-letter abbreviations in
  827.      uppercase.
  828.  
  829.      For consistency, the following conventions are used in many
  830.      functions:
  831.  
  832.           "y" or "yes" is used to indicate "yes", "on",  "open",  etc.
  833.           "n" or "no"  is used to indicate "no",  "off", "close", etc.
  834.  
  835.      _____
  836.  
  837.      ABAUd
  838.      _____
  839.  
  840.      Default key:   none
  841.      Description:   Set AutoBaud toggle.
  842.  
  843.      Examples:
  844.  
  845.           {abaud}             Toggle AutoBaud on/off
  846.           {abaud y}           Turn on AutoBaud
  847.           {abaud n}           Turn off AutoBaud
  848.  
  849.      _____
  850.  
  851.      ALARm
  852.      _____
  853.  
  854.      Default key:   none
  855.      Description:   Ring the alarm.
  856.  
  857.      Examples:
  858.  
  859.           {alarm}        Ring alarm, use ring count in Setup File.
  860.           {alarm 2}      Ring alarm 2 times.
  861.  
  862.      {COMMO} will wait until the alarm has stopped ringing before
  863.      proceeding to the next macro function (the alarm may be
  864.      terminated early by pressing a key).
  865.  
  866.  
  867.  
  868.                    {COMMO} (tm)  Macro Programming Guide            18
  869.  
  870.  
  871.      _______
  872.  
  873.      ASCIiup
  874.      _______
  875.  
  876.      Default key:   Alt-A
  877.      Description:   Upload an ASCII (text) file.
  878.  
  879.      General form:
  880.  
  881.           {ASCIiup pathname[\],pace}
  882.  
  883.                pathname       The complete path and filename (if the
  884.                               path is absent, the current directory
  885.                               will be used). 
  886.  
  887.                               If a "\" is placed at the end of the
  888.                               pathname, the path will appear as a
  889.                               prompt in the ASCII Upload window.
  890.  
  891.                pace           The pacing character to be used.
  892.  
  893.      Switches:
  894.  
  895.                E1 or E   Expand blank lines.  A space will be sent
  896.                          when a zero-character line is encountered.
  897.  
  898.                E0        Do not expand blank lines.
  899.  
  900.                S1 or S   Strip linefeeds from outgoing text.
  901.  
  902.                S0        Do not strip linefeeds.
  903.  
  904.                          If a switch is absent, the current setting of
  905.                          the toggle will be used.  The toggles can be
  906.                          set in the Setup File or by using the Alt-T
  907.                          key command.
  908.  
  909.                          Switches apply to the current function only
  910.                          and do not affect the setting of the toggles.
  911.  
  912.      Examples:    
  913.  
  914.           {asci}                        Open ASCII Upload window.
  915.  
  916.           {asci-S}                      Open ASCII Upload window,
  917.                                         strip linefeeds when file is
  918.                                         sent.
  919.  
  920.           {asci %uldir%\}               Open ASCII Upload window,
  921.                                         prompt with the current value
  922.                                         of the variable "uldir".
  923.  
  924.  
  925.  
  926.                    {COMMO} (tm)  Macro Programming Guide            19
  927.  
  928.  
  929.  
  930.           {asci c:\msgs\file.xyz,:}     Upload "file.xyz."  Use ":"
  931.                                         for pacing.
  932.  
  933.           {asci-E0 c:\msgs\file.xyz}    Upload "file.xyz."  Use
  934.                                         current pacing character, do
  935.                                         not expand blank lines.
  936.  
  937.           {asci c:\msgs\file.xyz,}      Upload "file.xyz."  Do not use
  938.                                         pacing.
  939.  
  940.           {asci ,?}                     Set current pacing character
  941.                                         to "?"
  942.  
  943.           {asci ,}                      Set current pacing to "no"
  944.                                         pacing.
  945.  
  946.      The pacing character may be entered according to the rules shown
  947.      in Appendix D in the User Guide and Reference.  For example, "^m"
  948.      or "|" may be used to represent the carriage return.
  949.  
  950.      ____
  951.  
  952.      AUTO
  953.      ____
  954.  
  955.      Default key:   none
  956.      Description:   Maintain Auto Receive strings.
  957.  
  958.      General form:
  959.  
  960.           {AUTO label,string}
  961.  
  962.                label          Label to GOTO when the string is
  963.                               received.
  964.                string         String to look for, may be up to 32
  965.                               characters.
  966.  
  967.      Examples:
  968.  
  969.           {auto}                   Clear all Auto Receive strings.
  970.           {auto zmodem,^XB00}      Zmodem Auto Receive string.
  971.  
  972.      Note that only 8 Auto Receive strings may be in effect at the
  973.      same time (including any strings defined in the Setup File).
  974.  
  975.      Use this function with no arguments to clear all strings when
  976.      necessary.
  977.  
  978.      See also "TIPS on creating LOOKfor strings" under LOOKfor.
  979.  
  980.  
  981.  
  982.                    {COMMO} (tm)  Macro Programming Guide            20
  983.  
  984.  
  985.      ____
  986.  
  987.      BEEP
  988.      ____
  989.  
  990.      Default key:   none
  991.      Description:   Sound a beep.
  992.  
  993.      Example:
  994.  
  995.           {beep}              No arguments.
  996.  
  997.      _____
  998.  
  999.      BREAk
  1000.      _____
  1001.  
  1002.      Default key:   Alt-B
  1003.      Description:   Send a break.
  1004.  
  1005.      Example:
  1006.  
  1007.           {break}             No arguments.
  1008.  
  1009.      ____
  1010.  
  1011.      CALL
  1012.      ____
  1013.  
  1014.      Default key:   none
  1015.      Description:   Execute a macro subroutine.
  1016.  
  1017.      Example:
  1018.  
  1019.           {call abc}          Execute subroutine abc.
  1020.  
  1021.      CALL will push the location following the CALL function onto the
  1022.      macro stack, then it will GOTO the label given in the argument. 
  1023.      When a RETUrn is executed, the location will be popped and
  1024.      control will return to the function following the CALL.
  1025.  
  1026.      Note that macros may be nested up to 32 deep.
  1027.  
  1028.      See also RETUrn, PUSHstack, POPStack.
  1029.  
  1030.  
  1031.  
  1032.                    {COMMO} (tm)  Macro Programming Guide            21
  1033.  
  1034.  
  1035.      ______
  1036.  
  1037.      CALOok
  1038.      ______
  1039.  
  1040.      Default key:   none
  1041.      Description:   Set up an additional string to look for during a
  1042.                     subsequent LOOKfor function.
  1043.  
  1044.      General form:
  1045.  
  1046.           {CALOok label1,label2,string}
  1047.  
  1048.                label1    The return point for the CALL to label2.
  1049.  
  1050.                label2    The label to CALL when "string" is received
  1051.                          from the serial port.
  1052.  
  1053.                string    The ASCII string to look for.  The string
  1054.                          begins following the "," and is terminated by
  1055.                          the "}".
  1056.  
  1057.      When the routine at "label2" executes a RETUrn, control will pass
  1058.      to "label1".  This is equivalent to:
  1059.  
  1060.           {call label2} {:label1} ...
  1061.  
  1062.      See LOOKfor for details, examples and tips on using CALOok.
  1063.  
  1064.      See also: GOLOok, SETLook.
  1065.  
  1066.      _______
  1067.  
  1068.      CAPMode
  1069.      _______
  1070.  
  1071.      Default key:   none
  1072.      Description:   Set Capture Mode.
  1073.  
  1074.      Examples:
  1075.  
  1076.           {capmode screen}         Set Capture Mode to SCREEN.
  1077.           {capmode filter}         Set Capture Mode to FILTER.
  1078.           {capmode raw}            Set Capture Mode to RAW.
  1079.  
  1080.      See also CAPTure.
  1081.  
  1082.  
  1083.  
  1084.                    {COMMO} (tm)  Macro Programming Guide            22
  1085.  
  1086.  
  1087.      _______
  1088.  
  1089.      CAPTure
  1090.      _______
  1091.  
  1092.      Default key:   Alt-1
  1093.      Description:   Capture File Options.
  1094.  
  1095.      Examples:
  1096.  
  1097.           {capture}                     Open Capture File Options
  1098.                                         window.
  1099.  
  1100.           {capture y}                   Open current Capture File.
  1101.  
  1102.           {capture n}                   Close current Capture File.
  1103.  
  1104.           {capt y,c:\commo\file.xyz}    Open indicated Capture File.
  1105.  
  1106.           {capt n,c:\dl\newfile.cap}    Close current Capture File,
  1107.                                         set new file as indicated.
  1108.  
  1109.      NOTE:  The current Capture File will always be closed when a new
  1110.      file is opened.
  1111.  
  1112.      See also CAPMode.
  1113.  
  1114.      ________
  1115.  
  1116.      CHATmode
  1117.      ________
  1118.  
  1119.      Default key:   Alt-- (Alt minus)
  1120.      Description:   Set Chat Mode toggle.
  1121.  
  1122.      Examples:
  1123.  
  1124.           {chat}              Toggle Chat Mode on/off.
  1125.           {chat y}            Turn on Chat Mode.
  1126.           {chat n}            Turn off Chat Mode
  1127.  
  1128.      _____
  1129.  
  1130.      CLEAr
  1131.      _____
  1132.  
  1133.      Default key:   Alt-C
  1134.      Description:   Clear Terminal Screen to default colors.
  1135.  
  1136.      Example:
  1137.  
  1138.           {clear}             No arguments.
  1139.  
  1140.  
  1141.  
  1142.                    {COMMO} (tm)  Macro Programming Guide            23
  1143.  
  1144.  
  1145.  
  1146.      _______
  1147.  
  1148.      COMPare
  1149.      _______
  1150.  
  1151.      Default key:   none
  1152.      Description:   Compare a string or numeric variable.
  1153.  
  1154.      General form:
  1155.  
  1156.           {COMPare name,string}
  1157.  
  1158.                name           The name of a variable.
  1159.  
  1160.                string         A string of ASCII characters.
  1161.  
  1162.      Examples:
  1163.  
  1164.           {comp pword,aardvark}         Test if the variable "pword"
  1165.                                         is set to "aardvark."
  1166.  
  1167.           {comp pword}                  Test if "pword" is null.
  1168.           {comp pword,}                 Test if "pword" is null.
  1169.  
  1170.           {comp nmbr,5}                 Compare a numeric variable.
  1171.  
  1172.           {comp abc,%xyz}               Test if the variable "abc" is
  1173.                                         equal to the variable "xyz."
  1174.  
  1175.      A numeric variable is a string of ASCII digits, 0-9, forming a
  1176.      positive integer in the range from 0 to 65535.  If the number is
  1177.      outside this range or contains non-numeric characters, the
  1178.      results of the compare will be unpredictable.
  1179.  
  1180.      COMPare will set flags which can be tested with the IFCOndition
  1181.      function.
  1182.  
  1183.           The Condition Flag will be set to "true" if the two
  1184.           arguments are identical strings (case is ignored). 
  1185.           Otherwise it will be set to "false."
  1186.  
  1187.           The Numeric Flag will be set to "equal", "less than" or
  1188.           "greater than."  This flag is unpredictable unless both
  1189.           arguments are valid numeric variables.
  1190.  
  1191.      A variable may be tested for being null (no entry in variable
  1192.      space) by omitting the second argument (or by comparing to a null
  1193.      variable).
  1194.  
  1195.      See also IFCOndition.
  1196.  
  1197.  
  1198.  
  1199.                    {COMMO} (tm)  Macro Programming Guide            24
  1200.  
  1201.  
  1202.      ______
  1203.  
  1204.      CURSor
  1205.      ______
  1206.  
  1207.      Default key:   none
  1208.      Description:   Terminal Screen cursor on/off.
  1209.  
  1210.      Examples:
  1211.  
  1212.           {cursor}            Toggle Terminal cursor on/off.
  1213.           {curs y}            Turn on Terminal Screen cursor.
  1214.           {curs n}            Turn off Terminal Screen cursor.
  1215.  
  1216.      _________
  1217.  
  1218.      DECRement
  1219.      _________
  1220.  
  1221.      Default key:   none
  1222.      Description:   Subtract an amount from a numeric variable.
  1223.  
  1224.      Examples:
  1225.  
  1226.           {decr number,200}   Subtract 200 from "number".
  1227.           {decr count}        Subtract 1 from the variable "count".
  1228.  
  1229.      Numeric variables and the amounts to be subtracted may range from
  1230.      0 to 65535.  The default amount is 1.  Results less than 0 will
  1231.      be set to 0.
  1232.  
  1233.      If the variable is not numeric, the results will be
  1234.      unpredictable.
  1235.  
  1236.      See also INCRement.
  1237.  
  1238.      ____
  1239.  
  1240.      DIAL
  1241.      ____
  1242.  
  1243.      Default keys:  Alt-D, Alt-N
  1244.      Description:   Dialing Directory.
  1245.  
  1246.      General form:
  1247.  
  1248.           {DIAL tries,label}
  1249.  
  1250.                tries     The maximum number of dialing tries.  If no
  1251.                          connection is established when the try count
  1252.                          is exhausted, the macro in the second
  1253.  
  1254.  
  1255.  
  1256.                    {COMMO} (tm)  Macro Programming Guide            25
  1257.  
  1258.  
  1259.                          argument will be started.  May be 0 to 999. 
  1260.                          "0" means unlimited.  Default is 0.
  1261.  
  1262.                label     A macro to GOTO if the try count in the first
  1263.                          argument is exhausted.  If no macro is
  1264.                          specified or if the macro label is invalid,
  1265.                          control will pass to the next function. 
  1266.                          Default is none.
  1267.  
  1268.      Switches:
  1269.  
  1270.                C1 or C   Specifies that a Linked Macro (from the
  1271.                          Dialing Directory) will be entered via CALL
  1272.                          (instead of GOTO).  When the Linked Macro
  1273.                          executes a RETUrn, control returns to the
  1274.                          DIAL function and Multi Number Dialing will
  1275.                          resume (see below).
  1276.  
  1277.                C0        Enter the Linked Macro via GOTO (default).
  1278.  
  1279.  
  1280.      Examples:
  1281.  
  1282.           {dial}              Open Dialing Directory window (similar
  1283.                               to Alt-D).
  1284.  
  1285.           {dial ,}            Multi Number Dial (similar to Alt-N).
  1286.  
  1287.           {dial 25,abc}       Multi Number Dial with try count.
  1288.  
  1289.           {dial-C ,}          Multi Number Dial, CALL Linked Macros.
  1290.  
  1291.  
  1292.      Marked numbers will be redialed in sequence.  Numbers may be
  1293.      marked in one of several ways:
  1294.  
  1295.           1)   Manually in the Dialing Directory window.
  1296.           2)   By placing Dialing Strings on the {COMMO} command line.
  1297.           3)   Using the MARK macro function.
  1298.  
  1299.      If a connection occurs and a valid Linked Macro is specified in
  1300.      the Dialing Directory, the macro will be started (via GOTO unless
  1301.      the "C" switch is present).  If no macro is specified in the
  1302.      Dialing Directory, control is passed to the next function.
  1303.  
  1304.  
  1305.      To automatically resume Multi Number Dialing at the end of a
  1306.      Linked Macro, use one of the following methods.
  1307.  
  1308.           1)   Execute the following sequence at the end of each
  1309.                Linked Macro (or GOTO it):
  1310.  
  1311.  
  1312.  
  1313.                    {COMMO} (tm)  Macro Programming Guide            26
  1314.  
  1315.  
  1316.                ... {setlook 60} {lookfor ^jNO CARRIER^m} {dial ,} {}
  1317.  
  1318.                This allows more than one system to be called without
  1319.                operator intervention.  This method will also work when
  1320.                using Dialing Strings on the command line or when
  1321.                pressing Alt-U after marking systems for dialing.
  1322.  
  1323.           2)   Use the "C" switch in the DIAL function.  Each Linked
  1324.                Macro should end with a RETUrn which will transfer
  1325.                control back to the DIAL.  When all numbers have been
  1326.                called, the DIAL will pass control to the next function
  1327.                in sequence.
  1328.  
  1329.      See also: MARK, UNMArk.
  1330.  
  1331.      _______
  1332.  
  1333.      DISPlay
  1334.      _______
  1335.  
  1336.      Default key:   none
  1337.      Description:   Display a string to the screen.
  1338.  
  1339.      General form:
  1340.  
  1341.           {DISPlay row,col,attr,string}
  1342.  
  1343.                row       The row where the string will display.
  1344.                col       The column where the string will display.
  1345.                attr      The attribute (colors) of the string.
  1346.                string    The text of the string (no quotes).
  1347.  
  1348.      Examples:
  1349.  
  1350.           {display 12,20,17,Hello!}     Display "Hello!" at row 12,
  1351.                                         column 20.  Colors are white
  1352.                                         on blue.
  1353.  
  1354.           {disp ,,,Hello, again.^m^j}   Display "Hello, again." at the
  1355.                                         current cursor using the
  1356.                                         current attribute, followed by
  1357.                                         a cr/lf.
  1358.  
  1359.           {disp 3,40}                   Position the cursor at row 3,
  1360.                                         column 40.
  1361.  
  1362.      TIPS on using DISPlay:
  1363.  
  1364.      >    The attribute is specified in the same manner as the colors
  1365.           in the Setup File (press F10 in the Internal Editor to
  1366.           display the Color Chart).
  1367.  
  1368.  
  1369.  
  1370.                    {COMMO} (tm)  Macro Programming Guide            27
  1371.  
  1372.  
  1373.      >    Setting background colors to high intensity values will
  1374.           cause blinking (for example, using "9" instead of "1" will
  1375.           still give a blue background but the foreground character
  1376.           will blink).  
  1377.  
  1378.      >    After the string is displayed, the previous Terminal Screen
  1379.           attribute will be restored.
  1380.  
  1381.      >    Conversion is performed on the string according to the rules
  1382.           in Appendix D in the User Guide and Reference.
  1383.  
  1384.      _______
  1385.  
  1386.      DOORway
  1387.      _______
  1388.  
  1389.      Default key:   Alt-=
  1390.      Description:   Toggle Doorway Mode.
  1391.  
  1392.      Switches:
  1393.  
  1394.                S1 or S   Status Line on when entering Doorway Mode.
  1395.  
  1396.                S0        Status Line off (default).
  1397.  
  1398.                M0        Do not display Doorway enter/exit messages.
  1399.  
  1400.                M1        Display enter/exit messages (default).
  1401.  
  1402.      Examples:
  1403.  
  1404.           {doorway}           Toggle Doorway Mode on/off.
  1405.           {door-S}            Status Line on when entering Doorway
  1406.                               Mode.
  1407.           {doorway-M0}        Do not display enter/exit messages.
  1408.  
  1409.      The "S" switch is ignored when exiting Doorway Mode (the Status
  1410.      Line will be restored to its prior state).
  1411.  
  1412.      ______
  1413.  
  1414.      DPARms
  1415.      ______
  1416.  
  1417.      Default key:   Alt-P
  1418.      Description:   Set Default Dialing Terminal Parameters
  1419.  
  1420.  
  1421.  
  1422.                    {COMMO} (tm)  Macro Programming Guide            28
  1423.  
  1424.  
  1425.      General form:
  1426.  
  1427.           {DPARms speed,format,comport,terminal-type,delay}
  1428.  
  1429.                speed          The bps rate: 2400, 9600, etc.
  1430.                format         The data format: 8n1, 7e1, etc.
  1431.                comport        The serial port number: 1, 2, 3 or 4.
  1432.                terminal       The terminal-type: A, V or T.
  1433.                delay          The inter-character delay factor: 0-999.
  1434.  
  1435.      Examples:
  1436.  
  1437.           {dparms 2400,8,1,,20}    Set 2400 bps, 8n1, Com1, delay =
  1438.                                    20.
  1439.  
  1440.           {dparms ,,4,V}           Set Com4 VT102.
  1441.  
  1442.           {dparms 19200,7o1}       Set 19200 bps, 7o1.
  1443.  
  1444.      Note that omitted parameters are not changed.
  1445.  
  1446.      See also PARMs.
  1447.  
  1448.      ____
  1449.  
  1450.      EDIT
  1451.      ____
  1452.  
  1453.      Default key:   none
  1454.      Description:   Edit an external file.
  1455.  
  1456.      Example:
  1457.  
  1458.           {edit c:\autoexec.bat}        Edit AUTOEXEC.BAT file.
  1459.  
  1460.      EDIT may be used to edit any text file up to 64k in length.  The
  1461.      rules are the same as for editing a support file with the
  1462.      Internal Editor.
  1463.  
  1464.      TIPS on using EDIT:
  1465.  
  1466.      >    Control characters (below ASCII 28) may not be typed.
  1467.  
  1468.      >    Any data beyond the last cr/lf pair will be removed prior to
  1469.           editing.  A cr/lf pair will be added, if necessary, to
  1470.           ensure at least one line in the file.
  1471.  
  1472.      >    The file will be saved unconditionally when Alt-F is pressed
  1473.           or conditionally (if changes were made) when Esc is pressed. 
  1474.           The file is "saved in place" (no backup).
  1475.  
  1476.  
  1477.  
  1478.                    {COMMO} (tm)  Macro Programming Guide            29
  1479.  
  1480.  
  1481.      ______
  1482.  
  1483.      ELAPse
  1484.      ______
  1485.  
  1486.      Default key:   none
  1487.      Description:   Reset the elapsed timer to 0 minutes.
  1488.  
  1489.      Example:
  1490.  
  1491.           {elap}              No arguments.
  1492.  
  1493.      The elapsed timer is automatically reset whenever dialing begins
  1494.      and when a connection is made with a remote system.
  1495.  
  1496.      _______
  1497.  
  1498.      EXECute
  1499.      _______
  1500.  
  1501.      Default key:   none
  1502.      Description:   Execute a DOS command.
  1503.  
  1504.      Switches:
  1505.  
  1506.                A1 or A   Sound the alarm at the end of command
  1507.                          execution.
  1508.  
  1509.                A0        Do not sound the alarm (default).
  1510.  
  1511.                D1 or D   Execute an external program directly, without
  1512.                          use of the command processor (see details
  1513.                          below).
  1514.  
  1515.                D0        Use the command processor (default).
  1516.  
  1517.                N1 or N   Do not clear the screen before execution. 
  1518.                          This is useful when running programs that
  1519.                          clear or rewrite the screen.  Also for simple
  1520.                          DOS functions like changing directories,
  1521.                          renaming files, etc.  
  1522.  
  1523.                N0        Clear the screen (default).
  1524.  
  1525.                W         Wait for a key press before restoring the
  1526.                          Terminal Screen.  This is useful if you need
  1527.                          to see the results of the command execution.
  1528.  
  1529.                Wn        Wait for "n" seconds, "n" may range from 0 to
  1530.                          999.  Press a key to cancel the wait.
  1531.  
  1532.                          Note:  Default (no "W" switch) is no wait.
  1533.  
  1534.  
  1535.  
  1536.                    {COMMO} (tm)  Macro Programming Guide            30
  1537.  
  1538.  
  1539.  
  1540.      Examples:
  1541.  
  1542.           {exec-AW3 dsz port %_por speed %_spe sz %uldir%\%file}
  1543.  
  1544.                {COMMO} will prepare the DSZ command by expanding the
  1545.                "%" variables, then call DOS to execute the program.
  1546.  
  1547.                See the section "Macro Variables" for complete details
  1548.                on variable substitution.
  1549.  
  1550.                The alarm will sound at completion (the "A" switch) and
  1551.                {COMMO} will wait for three seconds (the "W3" switch)
  1552.                before restoring the Terminal Screen.
  1553.  
  1554.           {execute-DN c:\utils\list.com %_cap}
  1555.  
  1556.                The LIST program will be directly executed with the
  1557.                current Capture File pathname as a command line
  1558.                argument.  The screen will not be cleared (LIST will
  1559.                rewrite the screen).  {COMMO} will return immediately
  1560.                to the Terminal Screen when LIST exits.
  1561.  
  1562.      The EXECute function enables you to "build" a command to be
  1563.      executed by DOS.  The DOS command processor (COMMAND.COM) is
  1564.      normally used (see below), which implies that you may specify any
  1565.      command as you would type it from the DOS prompt.
  1566.  
  1567.      Thus you can execute batch files and internal DOS commands (REN,
  1568.      DEL, etc.).  Also you can omit command paths and extensions (if
  1569.      the command is in your PATH or in the current directory).
  1570.  
  1571.      Character conversion is performed in the EXECute function.  This
  1572.      enables you to specify control characters.  For example:
  1573.  
  1574.                {exec echo ^L> prn}   Send a formfeed to the printer
  1575.  
  1576.      See Appendix D in the User Guide and Reference for details on
  1577.      conversion.  Note that the vertical bar "|" is NOT translated to
  1578.      a carriage return in the EXECute function.  
  1579.  
  1580.  
  1581.  
  1582.                    {COMMO} (tm)  Macro Programming Guide            31
  1583.  
  1584.  
  1585.      Using the Direct Switch: exec-D
  1586.      -------------------------------
  1587.  
  1588.      Use this switch to execute .EXE and .COM programs without the use
  1589.      of the command processor (usually COMMAND.COM).
  1590.  
  1591.      The program's Exit Code (called ERRORLEVEL in batch files) is
  1592.      saved and may be tested with the IFERrorlevel function.  The Exit
  1593.      Code is also available in the variable "_err".
  1594.  
  1595.      There are several advantages to using the "D" switch:
  1596.  
  1597.      1)   Only the memory needed to run the program is required (the
  1598.           command processor requires that about 32k be available, even
  1599.           if the program being run is much smaller).
  1600.  
  1601.      2)   About 4k of memory is saved by not having a copy of the
  1602.           command processor resident when the program is running.
  1603.  
  1604.      3)   The program executes faster, since COMMAND.COM is not loaded
  1605.           from disk.
  1606.  
  1607.      4)   The program's Exit Code is preserved and may be tested with
  1608.           the {COMMO} IFERrorlevel function.
  1609.  
  1610.      Two important rules must be followed when using the "D" switch:
  1611.  
  1612.      1)   The full pathname of the program file must be specified,
  1613.           including the path where the file resides on disk and the
  1614.           file extension.  For example:
  1615.  
  1616.                {exec-D c:\util\list.com file.txt}
  1617.  
  1618.      2)   Only .EXE and .COM files may be run (batch files and
  1619.           internal DOS commands cannot be executed without the command
  1620.           processor).
  1621.  
  1622.  
  1623.      EXECute Preview Mode
  1624.      --------------------
  1625.  
  1626.      Use the Set Toggles key command, Alt-T, to turn on "EXECute
  1627.      Preview Mode."  This mode is used to test your DOS commands and
  1628.      performs the following steps for each EXECute function:
  1629.  
  1630.      1)   The command will be displayed after expanding variables and
  1631.           converting control characters.
  1632.  
  1633.      2)   You will be given an opportunity to cancel the command
  1634.           before it is executed.
  1635.  
  1636.  
  1637.  
  1638.                    {COMMO} (tm)  Macro Programming Guide            32
  1639.  
  1640.  
  1641.      3)   Following execution {COMMO} will wait before restoring the
  1642.           Terminal Screen.  This lets you see any error messages that
  1643.           the command may have displayed.
  1644.  
  1645.      ____
  1646.  
  1647.      EXIT
  1648.      ____
  1649.  
  1650.      Default key:   Alt-X
  1651.      Description:   Exit {COMMO}.
  1652.  
  1653.      General form:
  1654.  
  1655.           {EXIT number}
  1656.  
  1657.                number    The return code to be passed to DOS.  It may
  1658.                          be tested with the IF ERRORLEVEL batch
  1659.                          command.  Range is 0 to 255.
  1660.  
  1661.      Switches:
  1662.  
  1663.                D1 or D   Drop DTR and RTS.  Dropping DTR will cause
  1664.                          the modem to disconnect if it has been
  1665.                          properly initialized.  See Appendix A in the
  1666.                          User Guide and Reference.
  1667.  
  1668.                D0        Do not drop DTR and RTS.
  1669.  
  1670.                          If the switch is absent, the current setting
  1671.                          of the toggle will be used.  The toggle can
  1672.                          be set in the Setup File or by using the Alt-
  1673.                          T key command.
  1674.  
  1675.      Examples:
  1676.  
  1677.           {exit}              No arguments (return code = 0).
  1678.           {exit 3}            With return code.
  1679.           {exit-D}            Drop DTR and RTS.
  1680.  
  1681.      _________
  1682.  
  1683.      GETString
  1684.      _________
  1685.  
  1686.      Default key:   none
  1687.      Description:   Input a string from the modem to a variable.
  1688.  
  1689.      General form:
  1690.  
  1691.           {GETString name,count,label}
  1692.  
  1693.  
  1694.  
  1695.                    {COMMO} (tm)  Macro Programming Guide            33
  1696.  
  1697.  
  1698.                name      The name of the variable to which the string
  1699.                          will be assigned.
  1700.  
  1701.                count     The maximum number of data characters
  1702.                          allowed.  A carriage return will always
  1703.                          terminate input.  May be 1 to 240.  Default
  1704.                          is 240.
  1705.  
  1706.                label     A macro to GOTO if a carriage return is
  1707.                          received and no characters have been entered
  1708.                          (the string will be assigned as null).  If
  1709.                          this argument is omitted, control will pass
  1710.                          to the next function.
  1711.  
  1712.      Switches:
  1713.  
  1714.                A1 or A   "Append" mode.  Characters will be appended
  1715.                          to the variable.  If the current length of
  1716.                          the variable is greater than the count in the
  1717.                          second argument, a count of 240 will be
  1718.                          assumed.
  1719.  
  1720.                A0        The variable will be overwritten (default).
  1721.  
  1722.                H1 or H   "Hotkey" mode.  When the maximum number of
  1723.                          characters has been entered, control will
  1724.                          pass to the next function.
  1725.  
  1726.                H0        Ignore all input after the maximum has been
  1727.                          entered, except backspace and carriage return
  1728.                          (default).
  1729.  
  1730.                P1 or P   "Password" mode.  Asterisks will be echoed to
  1731.                          the remote and local terminals in place of
  1732.                          the received characters (Echo Status will be
  1733.                          honored, see SETGet).
  1734.  
  1735.                P0        Characters are echoed as received (default).
  1736.  
  1737.      Examples:
  1738.  
  1739.           {setget 60,timeout,y,^m^j}         Set GETString parameters.
  1740.           {gets fonum,12,badinput}           Get input to "fonum."
  1741.  
  1742.           {gets-p pword,20}                  Get a password.
  1743.  
  1744.  
  1745.      TIPS on using GETString:
  1746.  
  1747.      >    The only control characters allowed (below ASCII 28) are
  1748.           carriage return (ASCII 13) and backspace (ASCII 8).  Other
  1749.  
  1750.  
  1751.  
  1752.                    {COMMO} (tm)  Macro Programming Guide            34
  1753.  
  1754.  
  1755.           control characters should be entered as ^J for linefeed,
  1756.           etc.  See Appendix D in the User Guide and Reference.
  1757.  
  1758.      >    Destructive backspace processing is supported for editing
  1759.           purposes.
  1760.  
  1761.      >    GETString supports "tandem" input.  Characters entered at
  1762.           either end will be input to the string (and displayed at
  1763.           both ends if echo is on (see SETGet).  Turn on Local Echo to
  1764.           see text locally that is sent to the remote with SEND,
  1765.           ASCIiup, etc.
  1766.  
  1767.      >    Use the "H" switch and a character count of 1 for "hotkeys."
  1768.  
  1769.      >    Turn off echo in the SETGet while waiting for the modem to
  1770.           answer (in host mode).  Some modems react poorly to
  1771.           characters being echoed when they are generating a response
  1772.           (such as "RING").
  1773.  
  1774.      >    Incoming characters displayed during a GETString function
  1775.           are not seen by subsequent CALOok/GOLOok/LOOKfor functions.
  1776.  
  1777.      See also SETGet.
  1778.  
  1779.      ______
  1780.  
  1781.      GOLOok
  1782.      ______
  1783.  
  1784.      Default key:   none
  1785.      Description:   Set up an additional string to look for during a
  1786.                     subsequent LOOKfor function.
  1787.  
  1788.      General form:
  1789.  
  1790.           {GOLOok label,string}
  1791.  
  1792.                label     A label to GOTO when "string" is received
  1793.                          from the serial port.
  1794.  
  1795.                string    The ASCII string to look for.  The string
  1796.                          begins following the "," and is terminated by
  1797.                          the "}".
  1798.  
  1799.      See LOOKfor for details, examples and tips on using GOLOok.
  1800.  
  1801.      See also: CALOok, SETLook.
  1802.  
  1803.  
  1804.  
  1805.                    {COMMO} (tm)  Macro Programming Guide            35
  1806.  
  1807.  
  1808.      ____
  1809.  
  1810.      GOTO
  1811.      ____
  1812.  
  1813.      Default key:   none
  1814.      Description:   Transfer control to a macro label.
  1815.  
  1816.      Example:
  1817.  
  1818.           {goto mail_run}          Control transferred to label
  1819.                                    "mail_run".
  1820.  
  1821.      ______
  1822.  
  1823.      HANGup
  1824.      ______
  1825.  
  1826.      Default key:   Alt-H
  1827.      Description:   Disconnect by dropping DTR.
  1828.  
  1829.      Examples:
  1830.  
  1831.           {hangup}            Prompt user for disconnect.
  1832.           {hangup y}          Disconnect without prompting.
  1833.  
  1834.      ____
  1835.  
  1836.      HELP
  1837.      ____
  1838.  
  1839.      Default key:   F1
  1840.      Description:   Open Online Help window.
  1841.  
  1842.      Example:
  1843.  
  1844.           {help}              Display key command help
  1845.           {help x}            Display topic "TX"
  1846.  
  1847.      Any single character may be specified.  {COMMO} will prefix it a
  1848.      "T" and search for the topic code.  You may create your own
  1849.      Online Help file.  See "Modifying the Help File" in The User
  1850.      Guide and Reference.
  1851.  
  1852.      _____
  1853.  
  1854.      HFLOw
  1855.      _____
  1856.  
  1857.      Default key:   none
  1858.      Description:   Set Hardware Flow Control toggle.
  1859.  
  1860.  
  1861.  
  1862.                    {COMMO} (tm)  Macro Programming Guide            36
  1863.  
  1864.  
  1865.      Examples:
  1866.  
  1867.           {hflow}             Toggle Hardware Flow Control on/off.
  1868.           {hflow y}           Turn on Hardware Flow Control.
  1869.           {hflow n}           Turn off Hardware Flow Control.
  1870.  
  1871.      ____
  1872.  
  1873.      HOLD
  1874.      ____
  1875.  
  1876.      Default key:   none
  1877.      Description:   Hold until specified time of day (24 hour format).
  1878.  
  1879.      Examples:
  1880.  
  1881.           {hold 3:30}         Hold until 3:30 am.
  1882.           {hold 16:10}        Hold until 4:10 pm.
  1883.           {hold 0:00}         Hold until midnight.
  1884.  
  1885.      NOTE:  Incoming characters displayed during a HOLD function are
  1886.      not seen by subsequent CALOok/GOLOok/LOOKfor functions.
  1887.  
  1888.      _________
  1889.  
  1890.      IFCArrier
  1891.      _________
  1892.  
  1893.      Default key:   none
  1894.      Description:   Test for presence of carrier detect signal.
  1895.  
  1896.      General form:
  1897.  
  1898.           {IFCArrier true,false}
  1899.  
  1900.                true           A label to GOTO if carrier is detected.
  1901.  
  1902.                false          A label to GOTO if carrier is not
  1903.                               detected.
  1904.  
  1905.      NOTE:  The default when either label is omitted is to pass
  1906.      control to the next function.
  1907.  
  1908.      Example:
  1909.  
  1910.                {ifcarrier c10,c20}
  1911.  
  1912.      Tip on using IFCArrier:
  1913.  
  1914.      >    When using a loop to wait for a change in carrier detect,
  1915.           you should include a short pause in the loop if you want
  1916.           characters to display.  The following sequence will display
  1917.  
  1918.  
  1919.  
  1920.                    {COMMO} (tm)  Macro Programming Guide            37
  1921.  
  1922.  
  1923.           incoming characters while waiting for carrier detect to
  1924.           drop:
  1925.  
  1926.                ... {:cd1} {pause 1} {ifcarrier cd1} ...
  1927.  
  1928.      ___________
  1929.  
  1930.      IFCOndition
  1931.      ___________
  1932.  
  1933.      Default key:   none
  1934.      Description:   Test for conditions set by other functions.
  1935.  
  1936.      General form:
  1937.  
  1938.           {IFCOndition true,false}
  1939.  
  1940.                true      A label to GOTO if the Condition Flag is
  1941.                          true.
  1942.  
  1943.                false     A label to GOTO if the Condition Flag is
  1944.                          false.
  1945.  
  1946.      NOTE:  The default when either label is omitted is to pass
  1947.      control to the next function.
  1948.  
  1949.      Switches:
  1950.  
  1951.                none      Test the current state of the Condition Flag.
  1952.  
  1953.                E1 or E   Test for numeric equality.  A numeric string
  1954.                          contains only the digits 0-9 and is in the
  1955.                          range 0 to 65535.
  1956.  
  1957.                L1 or L   Numeric test -- if first COMPare argument is
  1958.                          less than the second.
  1959.  
  1960.                G1 or G   Numeric test -- if first COMPare argument is
  1961.                          greater than the second.
  1962.  
  1963.      Examples:
  1964.  
  1965.           {compare var1,message}        Compare and set Condition
  1966.           {ifcondit match,nomatch}      Flag.  GOTO "match" if the
  1967.                                         variable "var1" is set to
  1968.                                         "message," to "nomatch" if it
  1969.                                         is not.
  1970.  
  1971.           {compare value,200}           Compare and set conditions.
  1972.           {ifcon-GE toobig,aok}         GOTO "toobig" if "value" is
  1973.                                         greater than or equal to 200,
  1974.                                         else GOTO "aok."
  1975.  
  1976.  
  1977.  
  1978.                    {COMMO} (tm)  Macro Programming Guide            38
  1979.  
  1980.  
  1981.  
  1982.           {instring zipcode,90}         Test if "zipcode" contains
  1983.           {ifcon yes,no}                the digits "90".  If "true"
  1984.                                         GOTO "yes", if "false" GOTO
  1985.                                         "no".
  1986.  
  1987.      Switches may be used in any combination.  If any numeric switches
  1988.      are present, the Condition Flag is not tested.
  1989.  
  1990.      The difference between testing for string equality and numeric
  1991.      equality is shown in this example:
  1992.  
  1993.           The strings "05" and "5" are different text strings, but are
  1994.           numerically equal.
  1995.  
  1996.      ____________
  1997.  
  1998.      IFERrorlevel
  1999.      ____________
  2000.  
  2001.      Default key:   none
  2002.      Description:   Test the Exit Code set by certain functions.
  2003.  
  2004.      General form:
  2005.  
  2006.           {IFERrorlevel number,true,false}
  2007.  
  2008.                number         A number from 0 to 255.  It will be
  2009.                               compared to the last Exit Code that was
  2010.                               set.
  2011.  
  2012.                true           A label to GOTO if the Exit Code is
  2013.                               greater than or equal to "number."
  2014.  
  2015.                false          A label to GOTO if the Exit Code is less
  2016.                               than "number."
  2017.  
  2018.      NOTE:  The default when either label is omitted is to pass
  2019.      control to the next function.
  2020.  
  2021.      Example:
  2022.  
  2023.                {iferror 1,abc,def}      GOTO "abc" if Exit Code is
  2024.                                         greater than or equal to 1. 
  2025.                                         Else GOTO def.
  2026.  
  2027.      TIPS on using IFERrorlevel:
  2028.  
  2029.      >    The Exit Code is set by certain functions (e.g., EXECute-D,
  2030.           SHELl, RXMOdem, SXMOdem) and should normally be tested
  2031.           immediately following execution of those functions.
  2032.  
  2033.  
  2034.  
  2035.                    {COMMO} (tm)  Macro Programming Guide            39
  2036.  
  2037.  
  2038.      >    EXECute without the "D" switch or Shell to DOS will normally
  2039.           set the Exit Code to 0.
  2040.  
  2041.      >    Many programs return an Exit Code greater than 0 when the
  2042.           result is unsuccessful.  DSZ, for example, will return an
  2043.           Exit Code of 1 if the file transfer has failed.
  2044.  
  2045.      >    The value of the Exit Code is also stored in the string
  2046.           variable "_err" and may be tested with COMPare.
  2047.  
  2048.      _______
  2049.  
  2050.      IFEXist
  2051.      _______
  2052.  
  2053.      Default key:   none
  2054.      Description:   Test for existence of a disk file or files.
  2055.  
  2056.      General form:
  2057.  
  2058.           {IFEXist pathname,true,false}
  2059.  
  2060.                pathname       A DOS pathname.  If the path is omitted,
  2061.                               the current directory will be used.  If
  2062.                               wildcards are used the "true" condition
  2063.                               will hold if any files match the
  2064.                               specification.
  2065.  
  2066.                true           A label to GOTO if the file exists.
  2067.  
  2068.                false          A label to GOTO if no files match.
  2069.  
  2070.      NOTE:  The default when either label is omitted is to pass
  2071.      control to the next function.
  2072.  
  2073.      Examples:
  2074.  
  2075.           {ifex a:file.xyz,,m20}             GOTO "m20" if not found.
  2076.           {ifex c:\data\words.txt,345}       GOTO "345" if found.
  2077.           {ifex c:\ul\*.rep,a01,a02}         Using a wildcard.
  2078.  
  2079.      _________
  2080.  
  2081.      INCRement
  2082.      _________
  2083.  
  2084.      Default key:   none
  2085.      Description:   Add an amount to a numeric variable.
  2086.  
  2087.      Examples:
  2088.  
  2089.           {incr number,1234}  Add 1234 to "number".
  2090.  
  2091.  
  2092.  
  2093.                    {COMMO} (tm)  Macro Programming Guide            40
  2094.  
  2095.  
  2096.           {incr count}        Add 1 to the variable "count".
  2097.  
  2098.      Numeric variables and the amounts to be added may range from 0 to
  2099.      65535.  The default amount is 1.  Results greater than 65535 will
  2100.      be set to 65535.
  2101.  
  2102.      If the variable is not numeric, the results will be
  2103.      unpredictable.
  2104.  
  2105.      See also DECRement.
  2106.  
  2107.      _________
  2108.  
  2109.      INITmodem
  2110.      _________
  2111.  
  2112.      Default key:   Alt-O
  2113.      Description:   Send Modem Initialization String.
  2114.  
  2115.      Example:
  2116.  
  2117.           {init}              No arguments
  2118.  
  2119.      _____
  2120.  
  2121.      INPUt
  2122.      _____
  2123.  
  2124.      Default key:   none
  2125.      Description:   Input a string from the keyboard.
  2126.  
  2127.      General form:
  2128.  
  2129.           {INPUt name,prompt}
  2130.  
  2131.                name      The name of a string variable.  The current
  2132.                          value of this variable will appear in the
  2133.                          input line.
  2134.  
  2135.                prompt    A prompt string that will appear in the input
  2136.                          window border.
  2137.  
  2138.      Example:
  2139.  
  2140.           {input upfile,Enter a filename:}        Input a string to
  2141.                                                   the variable
  2142.                                                   "upfile."
  2143.  
  2144.      If 0 data characters are entered, the variable will be set to
  2145.      null.
  2146.  
  2147.  
  2148.  
  2149.                    {COMMO} (tm)  Macro Programming Guide            41
  2150.  
  2151.  
  2152.      NOTE:  If Esc is pressed, macro processing will be terminated
  2153.      unless an exit label has been defined with SETEsc.
  2154.  
  2155.      ________
  2156.  
  2157.      INSTring
  2158.      ________
  2159.  
  2160.      Default key:   none
  2161.      Description:   Find a string within a string, return its
  2162.                     position.
  2163.  
  2164.      General form:
  2165.  
  2166.           {INSTring name,string}
  2167.  
  2168.                name      The name of a variable (string to search in).
  2169.                string    The string to search for.
  2170.  
  2171.      Example:
  2172.  
  2173.           {inst line,abc}     The variable "line" is searched for the
  2174.                               string "abc".
  2175.  
  2176.      INSTring will set the following:
  2177.  
  2178.           1)   The Condition Flag will be set to "true" if the string
  2179.                is found, to "false" if the string is not found.  Test
  2180.                with IFCOndition, no switches.
  2181.  
  2182.           2)   The starting position of the string will be returned in
  2183.                the built-in variable "_pos" (first character is "1"). 
  2184.                "_pos" will be set to zero if the string is not found.
  2185.  
  2186.      ______
  2187.  
  2188.      LENGth
  2189.      ______
  2190.  
  2191.      Default key:   none
  2192.      Description:   Determine the length of a string.
  2193.  
  2194.      Examples:
  2195.  
  2196.           {leng %line}             Find the length of the string in
  2197.                                    the variable "line".
  2198.  
  2199.           {leng %line1%%line2}     Find the combined length of "line1"
  2200.                                    and "line2".
  2201.  
  2202.      The length will be returned in the built-in variable "_len".  If
  2203.      the string is null, the length will be set to zero.
  2204.  
  2205.  
  2206.  
  2207.                    {COMMO} (tm)  Macro Programming Guide            42
  2208.  
  2209.  
  2210.  
  2211.      ______
  2212.  
  2213.      LIGHts
  2214.      ______
  2215.  
  2216.      Default key:   Alt-0
  2217.      Description:   Set Signal Lights toggle.
  2218.  
  2219.      Examples:
  2220.  
  2221.           {lights}            Toggle Signal Lights on/off.
  2222.           {lights y}          Turn on Signal Lights.
  2223.           {lights n}          Turn off Signal Lights.
  2224.  
  2225.      _________
  2226.  
  2227.      LOCAlecho
  2228.      _________
  2229.  
  2230.      Default key:   none
  2231.      Description:   Set Local Echo toggle.
  2232.  
  2233.      Examples:
  2234.  
  2235.           {local}             Toggle Local Echo on/off.
  2236.           {local y}           Turn on Local Echo.
  2237.           {local n}           Turn off Local Echo.
  2238.  
  2239.      _______
  2240.  
  2241.      LOOKfor
  2242.      _______
  2243.  
  2244.      Default key:   none
  2245.      Description:   Look for strings in the modem input stream.
  2246.  
  2247.      LOOKfor may be used in conjunction with CALOok and GOLOok to scan
  2248.      for up to 16 strings at the same time.  When CALOok and GOLOok
  2249.      set up additional strings to look for, the actual "looking" does
  2250.      not take place until the LOOKfor executes.
  2251.  
  2252.      Parameters controlling LOOKfor execution are set with the SETLook
  2253.      function, which should be executed before any LOOKfor functions. 
  2254.      See the description of the SETLook function for details.
  2255.  
  2256.      Examples using LOOKfor only:
  2257.  
  2258.           {lookfor first name?}    Look for the string "first name?"
  2259.  
  2260.           {look ^(COMMO^)}         Look for the string "{COMMO}".
  2261.  
  2262.  
  2263.  
  2264.                    {COMMO} (tm)  Macro Programming Guide            43
  2265.  
  2266.  
  2267.           When the string comes in, control will pass to the next
  2268.           function.
  2269.  
  2270.      Example construct using CALOok/GOLOok/LOOKfor:
  2271.  
  2272.                     {setlook 60,hng,3,n|}
  2273.                       ...
  2274.  
  2275.           {:m_1234}
  2276.                     {golook aaa,string1}
  2277.                     {calook m_1234,bbb,string2}
  2278.                     {calook m_1234,ccc,string3}
  2279.                     {golook ,string4}
  2280.                     {lookfor string5} {send answer5|} {goto ddd}
  2281.  
  2282.           {:aaa}    {hangup y} {goto cancel}
  2283.           {:bbb}    {send answer2|} {return}
  2284.           {:ccc}    {send answer3|} {call subr} {return}
  2285.  
  2286.           {:ddd}      ...
  2287.  
  2288.           In this example {COMMO} will look for five strings.  When
  2289.           any string comes in, the LOOKfor is terminated (all strings
  2290.           are cancelled).  It may be set up again by going back to
  2291.           "m_1234".
  2292.  
  2293.           The GOLOok function for string1 will GOTO "aaa" when the
  2294.           string comes in.  In the example control will pass to
  2295.           "cancel".
  2296.  
  2297.           If string2 or string3 come in the CALOok functions will set
  2298.           "m_1234" as the return point and then CALL "bbb" or "ccc"
  2299.           respectively.  When these routines RETUrn, control returns
  2300.           to "m_1234" and the five string LOOKfor will be set up
  2301.           again.
  2302.  
  2303.           The GOLOok for string4 has a null label and control will
  2304.           pass to the function following the LOOKfor if that string
  2305.           comes in.  The "," must be present.
  2306.  
  2307.           If string5 comes in, control will also pass to the function
  2308.           following the LOOKfor.
  2309.  
  2310.      TIPS on creating LOOKfor strings:
  2311.  
  2312.      >    There should be just one space following the LOOKfor
  2313.           function name.  Any spaces beyond this point are part of the
  2314.           string.  The string ends at the right curly brace.
  2315.  
  2316.      >    CALOok/GOLOok/Auto Receive strings begin immediately after
  2317.           the comma.  There should be no spaces unless they are part
  2318.           of the string.
  2319.  
  2320.  
  2321.  
  2322.                    {COMMO} (tm)  Macro Programming Guide            44
  2323.  
  2324.  
  2325.  
  2326.      >    Strings may be up to 32 characters in length (control
  2327.           characters like "^M" count as one).  Upper/lower case is
  2328.           ignored.
  2329.  
  2330.      >    ANSI control sequences are filtered if ANSI or VT102
  2331.           emulation is enabled.
  2332.  
  2333.      >    Remember that short strings may not be unique enough, long
  2334.           strings may not match due to line noise.
  2335.  
  2336.      >    Rules for representing special characters in
  2337.           CALOok/GOLOok/LOOKfor/Auto Receive strings are given in
  2338.           Appendix D in the User Guide and Reference.
  2339.  
  2340.      Additional TIPS:
  2341.  
  2342.      >    CALOok and GOLOok functions should immediately precede a
  2343.           LOOKfor (no string compares actually occur until the LOOKfor
  2344.           executes).  Up to 15 CALOok/GOLOok strings may be used for a
  2345.           total of up to 16 strings to scan for.
  2346.  
  2347.      >    FILTER Capture Mode should be used to determine the exact
  2348.           prompt to look for.  The LOOKfor sees the incoming data
  2349.           exactly as it is captured when FILTER mode is set.
  2350.  
  2351.      >    If two or more strings cause a match at the same time, the
  2352.           LAST such string listed is the one acted upon.  For example,
  2353.           if "abcdef" and "def" are listed and "abcdef" comes in.
  2354.  
  2355.      >    Since the LOOKfor is terminated whenever any of the strings
  2356.           come in (or when the LOOKfor timeout expires), this
  2357.           structure is unrestricted -- that is, CALLs, GOTOs, other
  2358.           CALOok/GOLOok/LOOKfor constructs, etc., may be used freely
  2359.           in any of the branches.
  2360.  
  2361.      See also: CALOok, GOLOok, SETLook.
  2362.  
  2363.      _______
  2364.  
  2365.      MACLoad
  2366.      _______
  2367.  
  2368.      Default key:   none
  2369.      Description:   Load a new Macro File.
  2370.  
  2371.      Switches:
  2372.  
  2373.                R1 or R   Specifies that COMMO.MAC will be reloaded
  2374.                          when carrier detect is lost.  Normally this
  2375.                          would occur at the end of the call.
  2376.  
  2377.  
  2378.  
  2379.                    {COMMO} (tm)  Macro Programming Guide            45
  2380.  
  2381.  
  2382.                R0        Do not reload COMMO.MAC when carrier is lost
  2383.                          (default).
  2384.  
  2385.      General form:
  2386.  
  2387.           {MACLoad filename,label}
  2388.  
  2389.                filename       The new Macro File.  Do NOT specify a
  2390.                               path; the {COMMO} home directory will be
  2391.                               used.
  2392.  
  2393.                label          A label to GOTO when the new file is
  2394.                               loaded.  Optional.
  2395.  
  2396.      Examples:
  2397.  
  2398.           {macload-R vt102-1.mac}       Load vt102-1.mac, reload
  2399.                                         COMMO.MAC at the end of the
  2400.                                         call.
  2401.  
  2402.           {macl newmac.fil,abc}         Load newmac.fil, start macro
  2403.                                         "abc" in the new file.
  2404.  
  2405.  
  2406.      IMPORTANT!  The new Macro File must reside in the {COMMO} home
  2407.      directory (do not specify a path).
  2408.  
  2409.      The current file will be saved to disk if changes are
  2410.      outstanding.  The new file is then loaded in place of the current
  2411.      one (all macros are replaced).  
  2412.  
  2413.      MACLoad should be the last function in a macro, since control is
  2414.      not returned.
  2415.  
  2416.      _____
  2417.  
  2418.      MACRo
  2419.      _____
  2420.  
  2421.      Default key:   Alt-M
  2422.      Description:   Open Macro Processor window.
  2423.  
  2424.      Examples:
  2425.  
  2426.           {macro}             Open window at current position.
  2427.           {macro menu1}       Open window at "menu1."
  2428.  
  2429.      NOTE:  The MACRo function always terminates the macro that is
  2430.      currently executing.
  2431.  
  2432.      A string argument may be included to facilitate the creation of
  2433.      menus within the Macro File.  The first occurrence of the
  2434.  
  2435.  
  2436.  
  2437.                    {COMMO} (tm)  Macro Programming Guide            46
  2438.  
  2439.  
  2440.      argument string will become the top line of the display when the
  2441.      window is opened.
  2442.  
  2443.      The Selector Bar will be positioned on the first screen line that
  2444.      has a left curly brace, if any.
  2445.  
  2446.      Here is an example of how to structure a menu using MACRo:
  2447.  
  2448.  
  2449.                                         | (this is past col. 80)
  2450.                                         | menu111
  2451.                Name of Menu             |
  2452.                                         |
  2453.                                         |
  2454.                Selection 1              | {exec ... } {}
  2455.                Selection 2              | {exec ... } {}
  2456.                Selection 3              | {exec ... } {}
  2457.                                         | {:af1} {macro menu111}
  2458.  
  2459.  
  2460.      The upper line with "menu111" will be the top line of the screen. 
  2461.      Pressing Alt-F1 will bring up the menu with the Selector Bar on
  2462.      Selection 1.
  2463.  
  2464.      Remember that the function itself will be found in the search
  2465.      since it contains the string.
  2466.  
  2467.      ____
  2468.  
  2469.      MARK
  2470.      ____
  2471.  
  2472.      Default key:   none
  2473.      Description:   Mark Dialing Directory entries for dialing.
  2474.  
  2475.      Example:
  2476.  
  2477.           {mark joes-bbs,file-city}     Mark entries for dialing.
  2478.  
  2479.      Dialing Strings may be separated by spaces or commas.
  2480.  
  2481.      {COMMO} will search the Dialing Directory for each string and
  2482.      mark the first entry where a match is found.  Case is ignored.
  2483.  
  2484.      The strings may consist of any part of a Dialing Directory entry
  2485.      line (including passwords).  However the following characters may
  2486.      not appear in a macro Dialing String: space, comma, left or right
  2487.      curly brace.
  2488.  
  2489.      See also: DIAL, UNMArk.
  2490.  
  2491.  
  2492.  
  2493.                    {COMMO} (tm)  Macro Programming Guide            47
  2494.  
  2495.  
  2496.      _________
  2497.  
  2498.      NOCArrier
  2499.      _________
  2500.  
  2501.      Default key:   none
  2502.      Description:   Sets/resets a macro to execute when carrier detect
  2503.                     is lost.
  2504.  
  2505.      Examples:
  2506.  
  2507.           {nocar carrlost}         GOTO the label "carrlost" when the
  2508.                                    carrier detect signal drops.
  2509.  
  2510.           {nocar}                  Turn off the carrier lost label.
  2511.  
  2512.      IMPORTANT:  This feature is enabled only when a connection is
  2513.      made using {COMMO}'s Auto Dialer.  Also, if carrier drops while a
  2514.      macro is running or a command window is open (such as the Dialing
  2515.      Directory or Capture File Options), the carrier lost macro will
  2516.      not activate.
  2517.  
  2518.      Be sure that you have your modem configured to provide the
  2519.      carrier detect signal.  See Appendix A in the User Guide and
  2520.      Reference for modem information.
  2521.  
  2522.      ____
  2523.  
  2524.      NOOP
  2525.      ____
  2526.  
  2527.      Default key:   none
  2528.      Description:   No-op function, does nothing
  2529.  
  2530.      Example:
  2531.  
  2532.           {noop}              No arguments.
  2533.  
  2534.      _____
  2535.  
  2536.      PARMs
  2537.      _____
  2538.  
  2539.      Default key:   Alt-P
  2540.      Description:   Set Current Terminal Parameters
  2541.  
  2542.  
  2543.  
  2544.                    {COMMO} (tm)  Macro Programming Guide            48
  2545.  
  2546.  
  2547.      General form:
  2548.  
  2549.           {PARMs speed,format,comport,terminal-type,delay}
  2550.  
  2551.                speed          The bps rate: 2400, 9600, etc.
  2552.                format         The data format: 8n1, 7e1, etc.
  2553.                comport        The serial port number: 1, 2, 3 or 4.
  2554.                terminal       The terminal-type: A, V or T.
  2555.                delay          The inter-character delay factor: 0-999.
  2556.  
  2557.      Examples:
  2558.  
  2559.           {parms 2400,8,1,,20}     Set 2400 bps, 8n1, Com1, delay =
  2560.                                    20.
  2561.  
  2562.           {parms ,,4,V}            Set Com4 VT102.
  2563.  
  2564.           {parms 19200,7o1}        Set 19200 bps, 7o1.
  2565.  
  2566.      Note that omitted parameters are not changed.
  2567.  
  2568.      See also DPARms.
  2569.  
  2570.      ________
  2571.  
  2572.      PASSword
  2573.      ________
  2574.  
  2575.      Default key:   Alt-W
  2576.      Description:   Send current password.
  2577.  
  2578.      Example:
  2579.  
  2580.           {password}          No arguments.
  2581.  
  2582.      The current password is obtained from the Dialing Directory entry
  2583.      whenever a number is dialed.  If no password is specified no
  2584.      characters will be sent.
  2585.  
  2586.      _____
  2587.  
  2588.      PAUSe
  2589.      _____
  2590.  
  2591.      Default key:   none
  2592.      Description:   Pause for up to 999 seconds.
  2593.  
  2594.      Example:
  2595.  
  2596.           {pause 25}          Pause for 25 seconds.
  2597.  
  2598.  
  2599.  
  2600.                    {COMMO} (tm)  Macro Programming Guide            49
  2601.  
  2602.  
  2603.      NOTE:  Incoming characters displayed during a PAUSe function are
  2604.      not seen by subsequent CALOok/GOLOok/LOOKfor functions.
  2605.  
  2606.      ________
  2607.  
  2608.      POPStack
  2609.      ________
  2610.  
  2611.      Default key:   none
  2612.      Description:   Pop an element from the macro stack.
  2613.  
  2614.      Switches:
  2615.  
  2616.                C1 or C   Clear all elements from the stack.
  2617.  
  2618.                C0        Pop the top element (default).
  2619.  
  2620.      Examples:
  2621.  
  2622.           {pops}              Pop the top element.
  2623.           {pops-c}            Clear the stack.
  2624.  
  2625.      POPStack throws away the top element on the macro stack.  This
  2626.      element would have been used by the next RETUrn function.
  2627.  
  2628.      See PUSHstack for a more complete description of the use of this
  2629.      function.
  2630.  
  2631.      See also CALL, RETUrn.
  2632.  
  2633.      ________
  2634.  
  2635.      PRINtlog
  2636.      ________
  2637.  
  2638.      Default key:   Alt-2
  2639.      Description:   Set Print Log toggle.
  2640.  
  2641.      Examples:
  2642.  
  2643.           {print}             Toggle Print Log on/off.
  2644.           {print y}           Turn on Print Log.
  2645.           {print n}           Turn off Print Log.
  2646.  
  2647.      _________
  2648.  
  2649.      PUSHstack
  2650.      _________
  2651.  
  2652.      Default key:   none
  2653.      Description:   Push a return point onto the macro stack.
  2654.  
  2655.  
  2656.  
  2657.                    {COMMO} (tm)  Macro Programming Guide            50
  2658.  
  2659.  
  2660.      Examples:
  2661.  
  2662.           {push}              Push the current location.
  2663.           {push abc}          Push the location "abc".
  2664.  
  2665.      When there are no arguments, the location pushed is the location
  2666.      of the PUSHstack function itself (i.e., it will be executed again
  2667.      when a RETUrn is encountered).
  2668.  
  2669.      Explanation:  Whenever a CALL is executed, the location of the
  2670.      function following the CALL (the "return point") is "pushed" onto
  2671.      the macro stack.  When a subsequent RETUrn is executed, the
  2672.      location at the top of the stack is "popped" and control is
  2673.      transferred to that location.  This allows "nesting" of CALLs and
  2674.      RETUrns.
  2675.  
  2676.      PUSHstack will push a return point onto the macro stack without
  2677.      transferring control to the location (control continues in
  2678.      sequence).  A subsequent RETUrn will transfer control to the
  2679.      location that was pushed.
  2680.  
  2681.      POPStack will remove the top stack element without transferring
  2682.      control to it (control continues in sequence).
  2683.  
  2684.      See also CALL, RETUrn.
  2685.  
  2686.      ______
  2687.  
  2688.      RCLOse
  2689.      ______
  2690.  
  2691.      Default key:   none
  2692.      Description:   Close the read file.
  2693.  
  2694.      Example:
  2695.  
  2696.           {rclose}            No arguments.
  2697.  
  2698.      IMPORTANT!  The read file will be closed automatically in the
  2699.      following situations:
  2700.  
  2701.           1)   When an attempt is made to read past the end of the
  2702.                file.
  2703.           2)   When the macro terminates (STOP, EXIT, etc.).
  2704.  
  2705.      A macro error will result if you try to close and no file is
  2706.      open.
  2707.  
  2708.      See also ROPEn, READ.
  2709.  
  2710.  
  2711.  
  2712.                    {COMMO} (tm)  Macro Programming Guide            51
  2713.  
  2714.  
  2715.      ____
  2716.  
  2717.      READ
  2718.      ____
  2719.  
  2720.      Default key:   none
  2721.      Description:   Read a line from the read file to a variable.
  2722.  
  2723.      Example:
  2724.  
  2725.           {read nextline}          Read the next line in the file into
  2726.                                    the variable "nextline."
  2727.  
  2728.      TIPS on reading files:
  2729.  
  2730.      >    Each READ will get another line until the end of the file is
  2731.           encountered, at which time control will GOTO the label
  2732.           specified when the file was opened.  If no label was
  2733.           specified (or the label is invalid) control continues in
  2734.           sequence.
  2735.  
  2736.           IMPORTANT:  In either case the file will be closed.
  2737.  
  2738.      >    ALL control characters (below ASCII 28) will be discarded,
  2739.           including the carriage return/linefeed that terminates the
  2740.           line.
  2741.  
  2742.      >    A file must be open for reading or a macro error will
  2743.           result.
  2744.  
  2745.      See also ROPEn, RCLOse
  2746.  
  2747.      ______
  2748.  
  2749.      RETUrn
  2750.      ______
  2751.  
  2752.      Default key:   none
  2753.      Description:   Return from a CALLed macro.
  2754.  
  2755.      Example:
  2756.  
  2757.           {return}            No arguments.
  2758.  
  2759.      This function will return control to a location determined by the
  2760.      last CALL or PUSHstack function.  See PUSHstack for a more
  2761.      complete description of CALL and RETUrn.
  2762.  
  2763.      NOTE:  If a RETUrn is encountered and no CALL or PUSHstack has
  2764.      been executed, a STOP will occur.  This is useful in macros that
  2765.      are CALLed and are also used standalone (such as protocol file
  2766.      transfer macros).
  2767.  
  2768.  
  2769.  
  2770.                    {COMMO} (tm)  Macro Programming Guide            52
  2771.  
  2772.  
  2773.  
  2774.      See also CALL, PUSHstack, POPStack.
  2775.  
  2776.      _____
  2777.  
  2778.      ROPEn
  2779.      _____
  2780.  
  2781.      Default key:   none
  2782.      Description:   Open a file for reading.
  2783.  
  2784.      General Form:
  2785.  
  2786.           {ROPEn name,label}
  2787.  
  2788.                name      The name of a string variable.
  2789.  
  2790.                label     A label to GOTO when a READ is attempted at
  2791.                          the end of the file.
  2792.  
  2793.      Example:
  2794.  
  2795.           {ropen c:\bbs\file.txt,nomore}     Open the file and set the
  2796.                                              label "nomore" to GOTO
  2797.                                              when the end of the file
  2798.                                              is reached.
  2799.  
  2800.      TIPS on using ROPEn:
  2801.  
  2802.      >    Only one file may be opened for reading (and one for
  2803.           writing).
  2804.  
  2805.      >    The file will be automatically closed when the end of the
  2806.           file is encountered during a READ (whether or not a label is
  2807.           specified).  An RCLOse is not needed in this situation and
  2808.           will cause a macro error.
  2809.  
  2810.      See also READ, RCLOse.
  2811.  
  2812.      _____
  2813.  
  2814.      RTRAn
  2815.      _____
  2816.  
  2817.      Default key:   none
  2818.      Description:   Maintain Receive Translate Table.
  2819.  
  2820.      Switches:
  2821.  
  2822.                I1 or I   Initialize Receive Translate Table to default
  2823.                          values (consecutive 0 to 255).
  2824.  
  2825.  
  2826.  
  2827.                    {COMMO} (tm)  Macro Programming Guide            53
  2828.  
  2829.  
  2830.                I0        Do not initialize (default).
  2831.  
  2832.      Examples:
  2833.  
  2834.           {rtran y}                Turn receive translation ON.
  2835.  
  2836.           {rtran-i n}              Initialize the table and turn it
  2837.                                    OFF.
  2838.  
  2839.           {rtran 26,0}             Change ASCII 26 to null (ASCII 0,
  2840.                                    which will not display).
  2841.  
  2842.           {rtran-i y,#8,224,240}   Initialize the table, turn receive
  2843.                                    translation ON, change ASCII 224 to
  2844.                                    240, 225 to 241, ..., 231 to 247. 
  2845.  
  2846.           {rtran}                  Toggle receive translation ON/OFF.
  2847.  
  2848.           {rtran #13,65,78,#13,78,65,#13,97,110,#13,110,97}
  2849.                                    ROT13 translation.  This swaps the
  2850.                                    first 13 letters of the alphabet
  2851.                                    for the second 13.
  2852.  
  2853.      Rules for RTRAn arguments are the same as for the {rtr=} item in
  2854.      the Setup File.  In addition, "n" may be used as the first
  2855.      argument to turn receive translation OFF at any time.
  2856.  
  2857.      See "Edit Setup File" in the User Guide and Reference for details
  2858.      and more examples.
  2859.  
  2860.      TIPS on using RTRAn:
  2861.  
  2862.      >    Some control characters are unaffected by translation when
  2863.           certain features are enabled.  Examples:  XON (17) and XOFF
  2864.           (19) are not translated when Software Flow Control is on. 
  2865.           ENQ (5) is not translated when ENQ/ACK emulation is on.
  2866.  
  2867.      >    When the Capture Mode is set to RAW, data will be captured
  2868.           prior to translation.  FILTER and SCREEN captures will
  2869.           contain translated data.
  2870.  
  2871.      >    LOOKfor will always see translated data.  Use FILTER Capture
  2872.           Mode to see what LOOKfor sees.
  2873.  
  2874.      >    In GETString, incoming data (as well as locally typed
  2875.           characters) will be translated with the Receive Translate
  2876.           Table (it may be necessary to turn receive translation off
  2877.           during certain GETString functions).
  2878.  
  2879.      See also STRAn.
  2880.  
  2881.  
  2882.  
  2883.                    {COMMO} (tm)  Macro Programming Guide            54
  2884.  
  2885.  
  2886.      _______
  2887.  
  2888.      RXMOdem
  2889.      _______
  2890.  
  2891.      Default key:   none
  2892.      Description:   Receive a file using Xmodem.
  2893.  
  2894.      Switches:
  2895.  
  2896.                C1 or C   Use CRC error correction (default).
  2897.                C0        Use Checksum error correction.
  2898.                D1 or D   Cancel transfer if carrier detect is lost
  2899.                          (default).
  2900.                D0        Ignore state of carrier detect.
  2901.                A1 or A   Sound the alarm at end of transfer.
  2902.                A0        Do not sound the alarm (default).
  2903.                W         Wait for a keypress at end of transfer.
  2904.                Wn        Wait for "n" seconds, "n" may range from 0 to
  2905.                          999.  Press a key to cancel the wait.
  2906.                          Note:  Default (no "W" switch) is no wait.
  2907.  
  2908.      Example:
  2909.  
  2910.           {rxmo-a c:\dl\file.zip}            Receive "file.zip", sound
  2911.                                              the alarm.
  2912.  
  2913.      TIPS on using RXMOdem:
  2914.  
  2915.      >    IMPORTANT!  If the file already exists it will be
  2916.           overwritten without warning.  The IFEXist function may be
  2917.           used to prevent this if desired.
  2918.  
  2919.      >    Block size is established by the sender and may be changed
  2920.           on a block-by-block basis.
  2921.  
  2922.      >    The transfer will be cancelled after 10 consecutive errors,
  2923.           if the sender cancels or if you press Esc.
  2924.  
  2925.      >    The Exit Code (test with IFER) will be set at the end of the
  2926.           transfer.  The Exit Code will also be stored in the variable
  2927.           "_err".  0 means success, 1 means failure.
  2928.  
  2929.      >    If the Usage Log is enabled, an entry will be made at the
  2930.           end of each transfer.
  2931.  
  2932.      See also SXMOdem.
  2933.  
  2934.  
  2935.  
  2936.                    {COMMO} (tm)  Macro Programming Guide            55
  2937.  
  2938.  
  2939.      ______
  2940.  
  2941.      SCREen
  2942.      ______
  2943.  
  2944.      Default key:   Alt-I
  2945.      Description:   Screen Image Save.
  2946.  
  2947.      Examples:
  2948.  
  2949.           {screen}                 Open Screen Image Save window.
  2950.           {screen y}               Append screen image to current
  2951.                                    file.
  2952.           {screen y,commo.scr}     Append screen image to indicated
  2953.                                    file. (and change current
  2954.                                    pathname).
  2955.           {screen n,c:\file.xyz}   Change current screen image
  2956.                                    pathname (don't save screen to
  2957.                                    file).
  2958.  
  2959.      __________
  2960.  
  2961.      SCROllback
  2962.      __________
  2963.  
  2964.      Default key:   Alt-K
  2965.      Description:   Display Scrollback Buffer
  2966.  
  2967.      Example:
  2968.  
  2969.           {scroll}            No arguments.
  2970.  
  2971.      ____
  2972.  
  2973.      SEND
  2974.      ____
  2975.  
  2976.      Default key:   none
  2977.      Description:   Send a string to the modem (serial port).
  2978.  
  2979.      Examples:
  2980.  
  2981.           {send Fred|~~Brucker|~~%_pass%|}
  2982.  
  2983.                               Send my first and last name with
  2984.                               carriage returns and 1 second delays,
  2985.                               then send the current password and a
  2986.                               <cr>.
  2987.  
  2988.           {send ^[^[}         Send two <esc> characters.
  2989.  
  2990.  
  2991.  
  2992.                    {COMMO} (tm)  Macro Programming Guide            56
  2993.  
  2994.  
  2995.           {send  }            Send a space (there must be two spaces,
  2996.                               the first is the separator).
  2997.  
  2998.           {send %line}        Send the string in the variable "line".
  2999.  
  3000.  
  3001.      NOTE:  See Appendix D in the User Guide and Reference for
  3002.      information on how to represent any character in a SEND function.
  3003.  
  3004.      ______
  3005.  
  3006.      SETEsc
  3007.      ______
  3008.  
  3009.      Default key:   none
  3010.      Description:   Define a label to GOTO when Esc is pressed.
  3011.  
  3012.      General form:
  3013.  
  3014.           {setesc label}
  3015.  
  3016.                label     A label to GOTO when the user presses Esc
  3017.                          during macro execution.
  3018.  
  3019.      Switches:
  3020.  
  3021.                P1 or P   The user will be prompted with, "A macro is
  3022.                          running.  Terminate it?."  If the user
  3023.                          answers "no," macro processing will continue
  3024.                          as if nothing had happened.  If "yes,"
  3025.                          processing will GOTO the label.  If the label
  3026.                          does not exist, a STOP will be executed.  P1
  3027.                          is the default.
  3028.  
  3029.                P0        The user will not be prompted.  Processing
  3030.                          will GOTO the label if it exists, else a STOP
  3031.                          will be executed.
  3032.  
  3033.      Examples:
  3034.  
  3035.           {setesc finish}          GOTO label, with prompt.
  3036.           {sete-p0 done}           GOTO label, without prompt.
  3037.           {setesc}                 Reset to no label (STOP on Esc).
  3038.  
  3039.  
  3040.      This function is used to "capture" the Esc key during macro
  3041.      execution, especially when a MACLoad is used to load a new Macro
  3042.      File.  It will help prevent accidental macro terminations.
  3043.  
  3044.      The macro at the label would typically reload COMMO.MAC, thus
  3045.      restoring the user's familiar environment.
  3046.  
  3047.  
  3048.  
  3049.                    {COMMO} (tm)  Macro Programming Guide            57
  3050.  
  3051.  
  3052.      NOTE:  In the various command windows, Esc is normally used to
  3053.      exit the window.  Use Ctrl-Break to bring up the prompt.
  3054.  
  3055.      ______
  3056.  
  3057.      SETGet
  3058.      ______
  3059.  
  3060.      Default key:   none
  3061.      Description:   Set parameters for GETString functions.
  3062.  
  3063.      General form:
  3064.  
  3065.           {SETGet seconds,label,y/n/l,string}
  3066.  
  3067.                seconds   GETString timeout.  If a character is not
  3068.                          entered in the specified amount of time, the
  3069.                          macro in the second argument will be started. 
  3070.                          May be 0 to 999.  Default is 0 (disabled).
  3071.  
  3072.                label     Timeout macro.  Macro to GOTO if the time in
  3073.                          the first argument expires.  If no macro is
  3074.                          specified or if the macro label is invalid,
  3075.                          control will pass to the function following
  3076.                          the GETString.  Default is no macro.
  3077.  
  3078.                          Note that if the timer expires no variable
  3079.                          assignment will be made.  Any previous
  3080.                          assignment will be unaltered.
  3081.  
  3082.                y/n/l     Echo Status.  If this is "yes", characters
  3083.                          entered at the local or remote terminals will
  3084.                          be echoed back to the remote and displayed
  3085.                          locally.  This is the default.
  3086.  
  3087.                          If "no", characters will not be echoed to
  3088.                          either location.
  3089.  
  3090.                          If "local", characters will be displayed
  3091.                          locally, but not echoed to the remote.  This
  3092.                          should be used when the remote is a host
  3093.                          system.
  3094.  
  3095.                          IMPORTANT!  This setting is independent of
  3096.                          Local Echo.  Turn on Local Echo if necessary
  3097.                          for local display of data transmitted with
  3098.                          SEND, ASCIiup, etc.
  3099.  
  3100.                string    Terminator response.  This string will be
  3101.                          sent and/or displayed locally (in accord with
  3102.                          the Echo Status) when a carriage return is
  3103.                          received (input terminated).  This is
  3104.  
  3105.  
  3106.  
  3107.                    {COMMO} (tm)  Macro Programming Guide            58
  3108.  
  3109.  
  3110.                          typically a carriage return/linefeed.  May be
  3111.                          up to 32 characters.  Default is no string.
  3112.  
  3113.      Example:
  3114.  
  3115.           {setg 120,noget,y,^m^j}       Set GETString parameters.
  3116.  
  3117.  
  3118.      The SETGet function will set parameters for all subsequent
  3119.      GETString functions.  It may be executed at any time to modify
  3120.      the parameters.
  3121.  
  3122.      When macro processing terminates, the parameters will be reset to
  3123.      the default values.
  3124.  
  3125.      Default arguments are:   GETString timeout        0 (disabled)
  3126.                               Timeout macro            none 
  3127.                               Echo status              y (echo on)
  3128.                               Terminator response      none
  3129.  
  3130.      IMPORTANT!  Null arguments in the SETGet function will be set to
  3131.      these defaults.
  3132.  
  3133.      See also: GETString.
  3134.  
  3135.      _______
  3136.  
  3137.      SETLook
  3138.      _______
  3139.  
  3140.      Default key:   none
  3141.      Description:   Set parameters for LOOKfor functions.
  3142.  
  3143.      General form:
  3144.  
  3145.           {SETLook seconds,label,seconds,string}
  3146.  
  3147.                seconds   LOOKfor timeout.  Maximum time in seconds to
  3148.                          look for a string.  If the string is not
  3149.                          found in the allotted time, the macro in the
  3150.                          second argument will be started.  May be 0 to
  3151.                          999.  Default is 0 (disabled).  
  3152.  
  3153.                label     Timeout macro.  Macro to GOTO if the time in
  3154.                          the first argument expires.  If no macro is
  3155.                          specified or if the macro label is invalid,
  3156.                          control will pass to the function following
  3157.                          the LOOKfor.
  3158.  
  3159.                seconds   Prompt timeout.  During a LOOKfor function
  3160.                          unwanted prompts may appear like "Press any
  3161.                          key" or "More [Y/n]", etc.  This argument is
  3162.  
  3163.  
  3164.  
  3165.                    {COMMO} (tm)  Macro Programming Guide            59
  3166.  
  3167.  
  3168.                          the time in seconds to wait at a prompt (no
  3169.                          input from the modem) before sending the
  3170.                          string in the fourth argument.  Usually you
  3171.                          would send "|" or "n|".
  3172.  
  3173.                          When the response string is sent the timer is
  3174.                          restarted, allowing any number of prompts to
  3175.                          be satisfied (until the LOOKfor itself is
  3176.                          satisfied or times out).
  3177.  
  3178.                          The timer will also be restarted if any keys
  3179.                          are typed while waiting.  This allows a
  3180.                          manual response to a prompt which the macro
  3181.                          does not handle.
  3182.  
  3183.                          IMPORTANT!  The prompt timeout should be long
  3184.                          enough (or disabled entirely) to prevent the
  3185.                          response from being sent when there is a long
  3186.                          delay without a prompt.  This might occur
  3187.                          right after connection while the BBS software
  3188.                          is loading or when a "door" program is
  3189.                          loading.
  3190.  
  3191.                          Failure to heed this warning will result in
  3192.                          "n" responses to "First name?" and other
  3193.                          undesirable effects.
  3194.  
  3195.                          May be 0 to 999.  Default is 0 (disabled).
  3196.  
  3197.                string    Prompt response.  String to send when the
  3198.                          time in the third argument runs out.  May be
  3199.                          up to 32 characters.  Default is no string.
  3200.  
  3201.      Example:
  3202.  
  3203.           {setl 60,abc,4,n|}       Set LOOKfor parameters
  3204.  
  3205.  
  3206.      The SETLook function will set parameters for all subsequent
  3207.      LOOKfor functions.  It may be executed at any time to modify the
  3208.      parameters.
  3209.  
  3210.      When macro processing terminates, the parameters will be reset to
  3211.      the default values.
  3212.  
  3213.      Default arguments are:   LOOKfor timeout     0 (disabled)
  3214.                               Timeout macro       none 
  3215.                               Prompt timeout      0 (disabled)
  3216.                               Prompt response     none
  3217.  
  3218.      IMPORTANT!  Null arguments in the SETLook function will revert to
  3219.      these defaults.
  3220.  
  3221.  
  3222.  
  3223.                    {COMMO} (tm)  Macro Programming Guide            60
  3224.  
  3225.  
  3226.  
  3227.      See also: LOOKfor, CALOok, GOLOok.
  3228.  
  3229.      ___________
  3230.  
  3231.      SETVariable
  3232.      ___________
  3233.  
  3234.      Default key:   none
  3235.      Description:   Assign a string to a variable name.
  3236.  
  3237.      General form:
  3238.  
  3239.           {SETVariable name,string}
  3240.  
  3241.                name      The name of the variable to which the string
  3242.                          will be assigned.
  3243.  
  3244.                string    The string may be the name of another {COMMO}
  3245.                          variable or an environment variable.  In
  3246.                          these cases further expansion is controlled
  3247.                          by switches (see below).
  3248.  
  3249.      Switches:
  3250.  
  3251.                E1 or E   This switch indicates that the second
  3252.                          argument is a DOS environment variable.  If
  3253.                          it is not found in the environment, the
  3254.                          {COMMO} variable will be set to NULL.
  3255.  
  3256.                          Note that environment variable names are CASE
  3257.                          SENSITIVE (they are usually upper case).
  3258.  
  3259.                E0        Normal variable (default).
  3260.  
  3261.                S1 or S   This switch will cause "double expansion" of
  3262.                          the second argument (indirect variable). 
  3263.                          First {COMMO} will substitute any variables
  3264.                          indicated by "%" signs.  The resulting string
  3265.                          (which must NOT begin with a "%") will then
  3266.                          be treated as a variable name and expanded
  3267.                          again.
  3268.  
  3269.                          This facility may be used to create a
  3270.                          "subscript."
  3271.  
  3272.                S0        Single expansion (default).
  3273.  
  3274.      Examples:
  3275.  
  3276.           {setv net,nodeid}             Assign the string "nodeid" to
  3277.                                         the variable name "net".
  3278.  
  3279.  
  3280.  
  3281.                    {COMMO} (tm)  Macro Programming Guide            61
  3282.  
  3283.  
  3284.  
  3285.           {setv nodeid,dirasnt}         Assign the string "dirasnt" to
  3286.                                         the variable name "nodeid".
  3287.  
  3288.           {setv-s bbs,nodeid}           Assuming the above examples
  3289.                                         have been executed, this will
  3290.                                         set the variable "bbs" to
  3291.                                         "dirasnt".
  3292.  
  3293.           {setv-s board,%net}           Assuming the above examples
  3294.                                         have been executed, this will
  3295.                                         set the variable "board" to
  3296.                                         "dirasnt".
  3297.  
  3298.           {setv-s xxx,yyy%index}        Suppose the variable "index"
  3299.                                         has the value "3".  It will be
  3300.                                         expanded first, then "yyy3"
  3301.                                         will be expanded and its value
  3302.                                         assigned to "xxx".
  3303.  
  3304.           {setv-e abc,TABLE}            Assuming a "SET TABLE=" DOS
  3305.                                         command has been executed
  3306.                                         prior to running {COMMO}, the
  3307.                                         variable "abc" will be set to
  3308.                                         the environment string.
  3309.  
  3310.           {setv abc} or {setv abc,}     Set the variable "abc" to null
  3311.                                         (it will be deleted from
  3312.                                         variable space).
  3313.  
  3314.      _____
  3315.  
  3316.      SHELl
  3317.      _____
  3318.  
  3319.      Default key:   Alt-S
  3320.      Description:   Shell to DOS.
  3321.  
  3322.      Example:
  3323.  
  3324.           {shell}             No arguments.
  3325.  
  3326.      _____
  3327.  
  3328.      SFLOw
  3329.      _____
  3330.  
  3331.      Default key:   none
  3332.      Description:   Set Software Flow Control toggle.
  3333.  
  3334.      Examples:
  3335.  
  3336.  
  3337.  
  3338.                    {COMMO} (tm)  Macro Programming Guide            62
  3339.  
  3340.  
  3341.           {sflow}             Toggle Software Flow Control on/off.
  3342.           {sflow y}           Turn on Software Flow Control.
  3343.           {sflow n}           Turn off Software Flow Control.
  3344.  
  3345.      _____
  3346.  
  3347.      SOUNd
  3348.      _____
  3349.  
  3350.      Default key:   none
  3351.      Description:   Set Master Sound toggle.
  3352.  
  3353.      Examples:
  3354.  
  3355.           {sound}             Toggle Master Sound on/off.
  3356.           {sound y}           Turn on Master Sound.
  3357.           {sound n}           Turn off Master Sound.
  3358.  
  3359.      _______
  3360.  
  3361.      SPDCtrl
  3362.      _______
  3363.  
  3364.      Default key:   none
  3365.      Description:   Serial port display control.
  3366.  
  3367.      Examples:
  3368.  
  3369.           {spdc y}            Serial port display is ON.
  3370.           {spdc n}            Serial port display is OFF.
  3371.  
  3372.      This function will suppress display of any data received from the
  3373.      serial port.  It can be used when a "clean" display is desired
  3374.      during automated procedures.
  3375.  
  3376.      TIPS on using SPDCtrl:
  3377.  
  3378.      >    ANSI control sequences are not processed while the display
  3379.           is OFF (Terminal Emulation effectively reverts to TTY).
  3380.  
  3381.      >    LOOKfor will function normally, but remember that ANSI
  3382.           sequences are not stripped.  Make a manual run using TTY
  3383.           emulation to see what the LOOKfor will see.
  3384.  
  3385.      >    SCREEN Capture Mode will not capture any of the incoming
  3386.           data.  Use RAW mode or FILTER mode instead (FILTER capture
  3387.           will be affected by the Translate Table, but will still
  3388.           contain ANSI sequences).
  3389.  
  3390.      >    Serial port display will always be restored to ON at macro
  3391.           termination.
  3392.  
  3393.  
  3394.  
  3395.                    {COMMO} (tm)  Macro Programming Guide            63
  3396.  
  3397.  
  3398.      _______
  3399.  
  3400.      SPOCtrl
  3401.      _______
  3402.  
  3403.      Default key:   none
  3404.      Description:   Serial port output control.
  3405.  
  3406.      Examples:
  3407.  
  3408.           {spoc y}            Serial port output is ON.
  3409.           {spoc n}            Serial port output is OFF.
  3410.  
  3411.      This function will inhibit any data from being sent to the serial
  3412.      port.  All other program operations will be normal.  It is used
  3413.      for "local mode" in host macros (no data is sent to the modem).
  3414.  
  3415.      Serial port output will always be restored to ON at macro
  3416.      termination.
  3417.  
  3418.      __________
  3419.  
  3420.      STATusline
  3421.      __________
  3422.  
  3423.      Default key:   none
  3424.      Description:   Set Status Line toggle.
  3425.  
  3426.      IMPORTANT!  The Status Line is {COMMO}'s instrument panel.  You
  3427.      should not turn it off until you are familiar with operating the
  3428.      program.
  3429.  
  3430.      Examples:
  3431.  
  3432.           {statusline}        Toggle Status Line on/off.
  3433.           {status y}          Turn on Status Line.
  3434.           {status n}          Turn off Status Line.
  3435.  
  3436.      When the Status Line is off (not visible), the bottom line of the
  3437.      display becomes part of the Terminal Screen.
  3438.  
  3439.      The STATusline function is ignored while in Chat Mode.
  3440.  
  3441.      ____
  3442.  
  3443.      STOP
  3444.      ____
  3445.  
  3446.      Default key:   none
  3447.      Description:   Halt macro execution.
  3448.  
  3449.      Examples:
  3450.  
  3451.  
  3452.  
  3453.                    {COMMO} (tm)  Macro Programming Guide            64
  3454.  
  3455.  
  3456.  
  3457.           {stop}              No arguments.
  3458.           {}                  Short form.
  3459.  
  3460.      STOP always returns {COMMO} to manual operation in the Terminal
  3461.      Screen.  It should be used to end login macros.
  3462.  
  3463.      _____
  3464.  
  3465.      STRAn
  3466.      _____
  3467.  
  3468.      Default key:   none
  3469.      Description:   Maintain Send Translate Table.
  3470.  
  3471.      Switches:
  3472.  
  3473.                I1 or I   Initialize Send Translate Table to default
  3474.                          values (consecutive 0 to 255).
  3475.  
  3476.                I0        Do not initialize (default).
  3477.  
  3478.      Examples:
  3479.  
  3480.           {stran y}           Turn send translation ON.
  3481.  
  3482.           {stran-i n}         Initialize the table and turn it OFF.
  3483.  
  3484.           {stran-i y,92,47}   Initialize the table, turn send
  3485.                               translation ON, change "\" to "/".
  3486.  
  3487.           {stran}             Toggle send translation ON/OFF.
  3488.  
  3489.           {stran #13,65,78,#13,78,65,#13,97,110,#13,110,97}
  3490.                               ROT13 translation.  This swaps the first
  3491.                               13 letters of the alphabet for the
  3492.                               second 13.
  3493.  
  3494.      Rules for STRAn arguments are the same as for the {str=} item in
  3495.      the Setup File.  In addition, "n" may be used as the first
  3496.      argument to turn send translation OFF at any time.
  3497.  
  3498.      See "Edit Setup File" in the User Guide and Reference for details
  3499.      and more examples.
  3500.  
  3501.      TIPS on using STRAn:
  3502.  
  3503.      >    Some control characters are unaffected by translation when
  3504.           certain features are enabled.  Examples:  XON (17) and XOFF
  3505.           (19) are not translated when Software Flow Control is on. 
  3506.           When ENQ/ACK emulation is on, an ACK sent in response to an
  3507.           ENQ will not be translated.
  3508.  
  3509.  
  3510.  
  3511.                    {COMMO} (tm)  Macro Programming Guide            65
  3512.  
  3513.  
  3514.  
  3515.      >    In GETString, data echoed to the modem (and displayed
  3516.           locally) will be translated with the Send Translate Table
  3517.           (it may be necessary to turn send translation off during
  3518.           certain GETString functions).
  3519.  
  3520.      See also RTRAn.
  3521.  
  3522.      _________
  3523.  
  3524.      SUBString
  3525.      _________
  3526.  
  3527.      Default key:   none
  3528.      Description:   Move a substring to a variable.
  3529.  
  3530.      General form:
  3531.  
  3532.           {SUBString name,start,count,string}
  3533.  
  3534.                name      The name of the variable to which the
  3535.                          substring will be assigned.
  3536.  
  3537.                start     The starting character number (first
  3538.                          character is "1").  If it is negative,
  3539.                          {COMMO} will count in from the end of the
  3540.                          string.
  3541.  
  3542.                          If it is too large and positive, the
  3543.                          substring will be null.
  3544.  
  3545.                          If it is too large and negative, the
  3546.                          substring will start at the beginning of the
  3547.                          string.
  3548.  
  3549.                count     The number of characters to use.  If the
  3550.                          number is too large, {COMMO} will use as many
  3551.                          as possible.  If the count is 0, the
  3552.                          substring will be null.
  3553.  
  3554.                string    The string to use.
  3555.  
  3556.      Examples:
  3557.  
  3558.           {subs var-sub,2,4,abcdefgh}        Set "var-sub" to "bcde".
  3559.           {subs newvar,-5,20,abcdefgh}       Set "newvar" to "defgh".
  3560.  
  3561.  
  3562.  
  3563.                    {COMMO} (tm)  Macro Programming Guide            66
  3564.  
  3565.  
  3566.      _______
  3567.  
  3568.      SXMOdem
  3569.      _______
  3570.  
  3571.      Default key:   none
  3572.      Description:   Send a file using Xmodem.
  3573.  
  3574.      Switches:
  3575.  
  3576.                K1 or K   Use 1024 byte block size (Xmodem-1k).
  3577.                K0        Use 128 byte block size (default).
  3578.                D1 or D   Cancel transfer if carrier detect is lost
  3579.                          (default).
  3580.                D0        Ignore state of carrier detect.
  3581.                A1 or A   Sound the alarm at end of transfer.
  3582.                A0        Do not sound the alarm (default).
  3583.                W         Wait for a keypress at end of transfer.
  3584.                Wn        Wait for "n" seconds, "n" may range from 0 to
  3585.                          999.  Press a key to cancel the wait.
  3586.                          Note:  Default (no "W" switch) is no wait.
  3587.  
  3588.      Example:
  3589.  
  3590.           {sxmo-ka c:\ul\file.zip}           Send "file.zip" using
  3591.                                              1024 byte block size,
  3592.                                              sound the alarm.
  3593.  
  3594.      TIPS on using SXMOdem:
  3595.  
  3596.      >    The transfer will be cancelled after 10 consecutive errors,
  3597.           if the receiver cancels or if you press Esc.
  3598.  
  3599.      >    CRC vs. Checksum mode is established by the receiver.
  3600.  
  3601.      >    The Exit Code (test with IFER) will be set at the end of the
  3602.           transfer.  The Exit Code will also be stored in the variable
  3603.           "_err".  0 means success, 1 means failure.
  3604.  
  3605.      >    If the Usage Log is enabled, an entry will be made at the
  3606.           end of each transfer.
  3607.  
  3608.      See also RXMOdem.
  3609.  
  3610.      _______
  3611.  
  3612.      TOGGles
  3613.      _______
  3614.  
  3615.      Default key:   Alt-T
  3616.      Description:   Set various toggle parameters.
  3617.  
  3618.  
  3619.  
  3620.                    {COMMO} (tm)  Macro Programming Guide            67
  3621.  
  3622.  
  3623.      Example:
  3624.  
  3625.           {toggles}                Open Set Toggles window.
  3626.  
  3627.      ______
  3628.  
  3629.      UNMArk
  3630.      ______
  3631.  
  3632.      Default key:   none
  3633.      Description:   Unmark Dialing Directory entries.
  3634.  
  3635.      Example:
  3636.  
  3637.           {unmark joes-bbs,file-city}        Unmark listed entries.
  3638.           {unmark}                           Unmark all entries.
  3639.  
  3640.      See the description of the MARK function for the rules on writing
  3641.      macro Dialing Strings.
  3642.  
  3643.      See also: DIAL, MARK.
  3644.  
  3645.      _____
  3646.  
  3647.      VTCUr
  3648.      _____
  3649.  
  3650.      Default key:   none
  3651.      Description:   Define a VT102 cursor (arrow) key.
  3652.  
  3653.      Example:
  3654.  
  3655.           {vtcur ^[[A|^[OA}        Define up-arrow key strings.
  3656.  
  3657.      The first string is sent when cursor mode is active; the second
  3658.      string is sent when application mode is active (these modes are
  3659.      controlled by the host).
  3660.  
  3661.      The two strings must be separated by a "|".  Use "^m" for
  3662.      carriage return if necessary.
  3663.  
  3664.      See also VTPAd.
  3665.  
  3666.      _____
  3667.  
  3668.      VTPAd
  3669.      _____
  3670.  
  3671.      Default key:   none
  3672.      Description:   Define a VT102 keypad key.
  3673.  
  3674.      Example:
  3675.  
  3676.  
  3677.  
  3678.                    {COMMO} (tm)  Macro Programming Guide            68
  3679.  
  3680.  
  3681.  
  3682.           {vtpad 5|^[Ou}           Define keypad "5" key strings.
  3683.  
  3684.      The first string is sent when numeric mode is active; the second
  3685.      string is sent when application mode is active (these modes are
  3686.      controlled by the host).
  3687.  
  3688.      The two strings must be separated by a "|".  Use "^m" for
  3689.      carriage return if necessary.
  3690.  
  3691.      See also VTCUr.
  3692.  
  3693.      ______
  3694.  
  3695.      WCLOse
  3696.      ______
  3697.  
  3698.      Default key:   none
  3699.      Description:   Close the write file.
  3700.  
  3701.      Example:
  3702.  
  3703.           {wclose}            No arguments.
  3704.  
  3705.      IMPORTANT!  A macro error will result if you try to close and no
  3706.      file is open.
  3707.  
  3708.      See also WOPEn, WRITE.
  3709.  
  3710.      _____
  3711.  
  3712.      WOPEn
  3713.      _____
  3714.  
  3715.      Default key:   none
  3716.      Description:   Open a file for writing.
  3717.  
  3718.      Switches:
  3719.  
  3720.                A1 or A   Open the file in "append" mode.  New lines
  3721.                          written to the file will be added at the end. 
  3722.                          If the file doesn't exist, it will be
  3723.                          created.
  3724.  
  3725.                A0        Open the file in "create" mode.  If the file
  3726.                          exists, it will be erased (default).
  3727.  
  3728.      Examples:
  3729.  
  3730.           {wopen c:\bbs\file.txt}       Open the file in create mode.
  3731.  
  3732.           {wopen-a c:\data\word.fil}    Open the file in append mode.
  3733.  
  3734.  
  3735.  
  3736.                    {COMMO} (tm)  Macro Programming Guide            69
  3737.  
  3738.  
  3739.  
  3740.      TIP on using WOPEn:
  3741.  
  3742.      >    Only one file may be opened for writing (and one for
  3743.           reading).
  3744.  
  3745.      See also WRITe, WCLOse.
  3746.  
  3747.      _____
  3748.  
  3749.      WRITe
  3750.      _____
  3751.  
  3752.      Default key:   none
  3753.      Description:   Write a string to the write file.
  3754.  
  3755.      Examples:
  3756.  
  3757.           {write %nextline}        Write the contents of the variable
  3758.                                    "nextline" to the write file.
  3759.  
  3760.           {write}                  Write a carriage return/linefeed
  3761.                                    only (blank line) to the file.
  3762.  
  3763.           {write %num%> }          Write the contents of "num"
  3764.                                    followed by a ">" and a space.
  3765.  
  3766.      TIPS on writing to files:
  3767.  
  3768.      >    A file must be open for writing or a macro error will
  3769.           result.
  3770.  
  3771.      >    The string will be written as one line, terminated by a
  3772.           carriage return/linefeed.
  3773.  
  3774.      >    Control character conversion is NOT performed on the write
  3775.           string.
  3776.  
  3777.      >    A macro error will result if the disk is full.
  3778.  
  3779.      See also WOPEn, WCLOse
  3780.  
  3781.  
  3782.  
  3783.                    {COMMO} (tm)  Macro Programming Guide            70
  3784.  
  3785.  
  3786.      ========================================
  3787.      Appendix A   Table of {COMMO} Key-labels
  3788.      ========================================
  3789.  
  3790.      Key-labels are also macro labels with the added advantage that
  3791.      the macro can be started by pressing the associated key from the
  3792.      Terminal Screen.  Most "extended" keys may be assigned this way. 
  3793.      If the same key-label appears more than once, the first
  3794.      occurrence will be used.  Note that key-labels are case
  3795.      insensitive.  The caret (^) indicates the Ctrl key.
  3796.  
  3797.      Enhanced keyboard key-labels are listed below.
  3798.  
  3799.  
  3800.           Key Name     Key-label     Key Name     Key-label
  3801.           ________     _________     ________     _________
  3802.  
  3803.           Normal-F1     nf1   ...    Normal-F10    nf0
  3804.           Ctrl-F1       cf1   ...    Ctrl-F10      cf0
  3805.           Shift-F1      sf1   ...    Shift-F10     sf0
  3806.           Alt-F1        af1   ...    Alt-F10       af0
  3807.  
  3808.           Alt-A         ala   ...    Alt-Z         alz
  3809.           Alt-1         al1   ...    Alt-0         al0
  3810.           Alt =         al=          Alt -         al-
  3811.  
  3812.           Escape        esc          Grey *        gr*
  3813.           Grey -        gr-          Grey +        gr+
  3814.  
  3815.           Backspace     bsp          ^Backspace    cbs
  3816.           Tab           tab          Shift-tab     stb
  3817.           Enter         ent          ^Enter        cen
  3818.  
  3819.           Home          hom          End           end
  3820.           PgUp          pgu          PgDn          pgd
  3821.           Up-Arrow      upa          Down-Arrow    dna
  3822.           Left-Arrow    lfa          Right-Arrow   rta
  3823.           Insert        ins          Delete        del
  3824.  
  3825.           ^Home         chm          ^End          cnd
  3826.           ^PgUp         cpu          ^PgDn         cpd
  3827.           ^Right-Arrow  cra          ^Left-Arrow   cla
  3828.  
  3829.           Keypad-0      kp0   ...    Keypad-9      kp9
  3830.           Keypad-.      kp.          ^PrtSc        cpr
  3831.  
  3832.  
  3833.  
  3834.                    {COMMO} (tm)  Macro Programming Guide            71
  3835.  
  3836.  
  3837.      Enhanced Keyboard Key-labels
  3838.      ============================
  3839.  
  3840.      IMPORTANT!  To use the following keys you must tell {COMMO} to
  3841.      test for the enhanced keyboard.  The item {tek=yes} must appear
  3842.      in your Setup File.
  3843.  
  3844.           Normal-F11    nfa          Normal-F12    nfb
  3845.           Ctrl-F11      cfa          Ctrl-F12      cfb
  3846.           Shift-F11     sfa          Shift-F12     sfb
  3847.           Alt-F11       afa          Alt-F12       afb
  3848.  
  3849.           Alt-[         al[          Alt-]         al]
  3850.           Alt-;         al;          Alt-'         al'
  3851.           Alt-,         al<          Alt-.         al.
  3852.           Alt-/         al/          Alt-\         al\
  3853.           Alt-*         al*          Alt-`         al`
  3854.           Center Key    cky
  3855.  
  3856.      The Center Key is the Keypad 5 with Numlock off.
  3857.  
  3858.      The keys in the second group may also work with the 83-key
  3859.      keyboard if your BIOS supports the enhanced keyboard.
  3860.  
  3861.  
  3862.  
  3863.                    {COMMO} (tm)  Macro Programming Guide            72
  3864.  
  3865.  
  3866.      =======================================
  3867.      Appendix B   List of Reserved Variables
  3868.      =======================================
  3869.  
  3870.      USER-DEFINED Reserved Variables
  3871.      -------------------------------
  3872.  
  3873.           _modini        Modem Initialization String
  3874.           _dialpf        Default Dialing Prefix
  3875.           _dialsf        Default Dialing Suffix
  3876.           _dialsr        Dialing Success responses
  3877.           _dialfr        Dialing Failure responses
  3878.           _uselog        Pathname of Usage Log
  3879.  
  3880.      BUILT-IN Variables
  3881.      ------------------
  3882.  
  3883.           _hom      {COMMO} home directory: c:\commo\, etc.
  3884.           _set      Filename of Setup File
  3885.           _fon      Filename of Dialing Directory
  3886.           _mac      Filename of default Macro File
  3887.           _cap      Current Capture File pathname
  3888.           _scr      Current Screen Image File pathname
  3889.           _err      Errorlevel from last EXEC-D, RXMOdem or SXMOdem
  3890.           _pos      Position in string
  3891.           _len      Length of string
  3892.           _por      Current serial port number: 1, 2, etc.
  3893.           _spe      Current serial port speed: 2400, 9600, etc.
  3894.           _mod      Last speed reported by modem
  3895.           _nci      Number of characters in input buffer
  3896.           _pas      Current Password String
  3897.           _ela      Elapsed time in minutes
  3898.           _dat      Full date, mm/dd/yy
  3899.           _mon      Month, mm
  3900.           _day      Day of the month, dd
  3901.           _yea      Year, yy
  3902.           _dwn      Numeric day of the week: 1=Mon, ... , 7=Sun
  3903.           _dwt      Text day of the week: Mon, Tue, ...
  3904.           _tim      Full time, hh:mm xm (am or pm)
  3905.           _24h      24 hour, hh
  3906.           _12h      12 hour, hh
  3907.           _amp      Am/pm indicator, xm
  3908.           _min      Minute, mm
  3909.           _sec      Second, ss
  3910.           _row      Current cursor row
  3911.           _col      Current cursor column
  3912.  
  3913.  
  3914.  
  3915.                    {COMMO} (tm)  Macro Programming Guide            73
  3916.  
  3917.  
  3918.      ============================================
  3919.      Appendix C   Macro Functions Listed by Class
  3920.      ============================================
  3921.  
  3922.      Variable manipulation
  3923.      ---------------------
  3924.  
  3925.           SETVariable    Assign a string to a variable name
  3926.           INCRement      Increment a numeric variable
  3927.           DECRement      Decrement a numeric variable
  3928.           INSTring       Find a string within a string
  3929.           SUBString      Move a substring to a variable
  3930.           LENGth         Determine the length of a string
  3931.  
  3932.      Looking for text
  3933.      ----------------
  3934.  
  3935.           AUTO           Auto Receive
  3936.           SETLook        Set LOOKfor parameters
  3937.           CALOok         Additional string to look for
  3938.           GOLOok         Additional string to look for
  3939.           LOOKfor        Look for string from port
  3940.  
  3941.      File Input/Output
  3942.      -----------------
  3943.  
  3944.           ROPEn          Open a file for reading
  3945.           READ           Read from a file to a variable
  3946.           RCLOse         Close the read file
  3947.           WOPEn          Open a file for writing
  3948.           WRITe          Write to a file from a variable
  3949.           WCLOse         Close the write file
  3950.  
  3951.      Dialing/connect/disconnect
  3952.      --------------------------
  3953.  
  3954.           ABAUd          AutoBaud toggle
  3955.           DIAL           Dialing Directory
  3956.           DPARms         Set dialing default parameters
  3957.           HANGup         Drop DTR to hangup
  3958.           MARK           Mark numbers for dialing
  3959.           UNMArk         Unmark Dialing Directory entries
  3960.  
  3961.      Modem control
  3962.      -------------
  3963.  
  3964.           PARMs          Set current terminal parameters
  3965.           LOCAlecho      Local Echo toggle
  3966.           INITmodem      Send modem init string
  3967.           HFLOW          Hardware flow control
  3968.           SFLOw          Software flow control
  3969.           BREAk          Send Break
  3970.  
  3971.  
  3972.  
  3973.                    {COMMO} (tm)  Macro Programming Guide            74
  3974.  
  3975.  
  3976.           LIGHts         Signal Lights toggle
  3977.           SPOCtrl        Serial port output control
  3978.  
  3979.      Send/receive data
  3980.      -----------------
  3981.  
  3982.           ASCIiup        ASCII Upload
  3983.           SEND           Send a text string
  3984.           CAPMode        Set Capture Mode
  3985.           CAPTure        Capture File Options
  3986.           SETGet         Set GETString parameters
  3987.           GETString      Get a string from the modem
  3988.           RXMOdem        Receive a file using Xmodem
  3989.           SXMOdem        Send a file using Xmodem
  3990.           PASSword       Send current password
  3991.           RTRAn          Maintain receive Translate Table
  3992.           STRAn          Maintain send Translate Table
  3993.           VTCUr          VT102 cursor key strings
  3994.           VTPAd          VT102 keypad key strings
  3995.  
  3996.      Testing
  3997.      -------
  3998.  
  3999.           COMPare        Compare a variable to a string
  4000.           IFCOndition    Test conditions set by COMPare
  4001.           IFERrorlevel   Test if Exit Code   number
  4002.           IFEXist        Test for existence of file(s)
  4003.           IFCArrier      Test for presence of carrier detect
  4004.  
  4005.      Macro control
  4006.      -------------
  4007.  
  4008.           CALL           Execute a macro
  4009.           RETUrn         Return from a CALL
  4010.           PUSHstack      Push a location to the macro stack
  4011.           POPStack       Pop from the macro stack
  4012.           GOTO           Transfer control to a label
  4013.           STOP           Stop macro processing
  4014.           MACLoad        Load a new Macro File
  4015.           PAUSe          Pause for interval 1-999 second
  4016.           HOLD           Hold until specified 24 hr time
  4017.           NOCArrier      Set a label to GOTO when carrier is lost
  4018.           SETEsc         Set a label to GOTO on Esc
  4019.  
  4020.      Video/sound related
  4021.      -------------------
  4022.  
  4023.           CLEAr          Clear Screen
  4024.           CURSor         Terminal Screen cursor toggle
  4025.           DISPlay        Display a string to the screen
  4026.           SCREen         Screen Image Save
  4027.           SPDCtrl        Serial port display control
  4028.  
  4029.  
  4030.  
  4031.                    {COMMO} (tm)  Macro Programming Guide            75
  4032.  
  4033.  
  4034.           STATusline     Status Line on/off toggle
  4035.           SOUNd          Master Sound toggle
  4036.           ALARm          Ring the alarm
  4037.           BEEP           Sound a beep
  4038.  
  4039.      Miscellaneous
  4040.      -------------
  4041.  
  4042.           CHATmode       Chat Mode toggle
  4043.           DOORway        Doorway Mode toggle
  4044.           ELAPse         Reset the elapsed timer
  4045.           EDIT           Edit a file
  4046.           EXECute        Execute a DOS command
  4047.           EXIT           Exit {COMMO}
  4048.           HELP           Online Help topic
  4049.           INPUt          Input from the keyboard
  4050.           MACRo          Macro Processor window
  4051.           NOOP           No-op function, does nothing
  4052.           PRINtlog       Print Log toggle
  4053.           SCROllback     Display Scrollback Buffer
  4054.           SHELl          Shell to DOS
  4055.           TOGGles        Set Toggles
  4056.  
  4057.  
  4058.                                    - end -
  4059.  
  4060.