home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / BBS / MISC / PHOMAST6.ZIP / PHOMAST.T < prev    next >
Encoding:
Text File  |  1991-03-14  |  79.5 KB  |  1,464 lines

  1.  
  2.   PHOMAST.T  [Version 6.4]                                   Michael R. Ash
  3.   Revised  to YAM/ZCOMM Version 17.70+                       15 March 91
  4.  
  5.  
  6.   This is the latest in a series of updates to PHOMAST.T scripts designed 
  7.   to get you up and running utilizing the power of Professional-YAM or ZCOMM.
  8.   For performance and clarity I have moved my opening remarks and instructions
  9.   about setting up this script to a separate file called: -> PHOMAST.DOC <-
  10.   New features of this update include fully automated menu configuration,
  11.   autospeed detection, and lots of slick coding examples...
  12.        
  13.   When run for the first time this script will generate a new file called
  14.   'PROFILE.DAT' containing specific configuration information that in the
  15.   past you used to have to know and write into the script with an editor
  16.   in advance before using YAM or ZCOMM.  This file, 'PROFILE.DAT', if present
  17.   is loaded every time YAM/ZCOMM is run and defines your generalized defaults.  
  18.   I have included comments everywhere to help you understand the fascinating
  19.   and comprehensive script language included in YAM and ZCOMM.  Any information
  20.   that follows a colon (:) mark is not read by YAM or ZCOMM since it is taken
  21.   as a comment.  When you are instructed to uncomment a line it means to load
  22.   the script into an editor and delete the colon at the start of the line so
  23.   the program can use it.
  24.     
  25.   When ZCOMM is loaded it looks in the \ZCOMM subdirectory for a file called
  26.   PHOMAST.T  -=-  When YAM is loaded it looks in the root for a file called
  27.   PHONES.T (you could rename PHOMAST.T to PHONES.T and put it in the root 
  28.   but there are a couple of better ways to handle this). The simplest and
  29.   most flexible method is to use the DOS 'set phones' command (shown below)
  30.   to tell YAM/ZCOMM where to find its phones file.  Another method is to 
  31.   have PUTSNP.EXE (the serial number installing routine) change the default
  32.   location of the phones files.      
  33.     
  34.                          set PHONES=c:\zcomm\phomast.t   
  35.  
  36.   The line above can be added to your AUTOEXEC.BAT file to tell YAM where 
  37.   to look for its phones file.  ZCOMM users won't need to use this line 
  38.   unless they want to have PHOMAST.T in another directory since it is already
  39.   the default location for ZCOMM.  The phones file (PHOMAST.T) gives YAM/ZCOMM
  40.   directions on how you want the package to operate.
  41.         
  42.   For those of you that haven't heard of YAM, it's the short name for 
  43.   Professional-YAM, a commercial package that includes all of ZCOMM (its 
  44.   shareware subset) plus advanced capabilities for professional tele-
  45.   communications requirements.     
  46.     
  47.   Dialing entries can be placed anywhere in the script but since the script
  48.   is read from the top down, entries placed near the top will be found first.
  49.   A simple dialing entry is usually one line as below, with the label 
  50.   starting in column 1.  Using the command 'call pcmag' will cause the 
  51.   following.  The old line will be 'hung-up', speed will be set to 2400 baud,
  52.   number dialed, then Error correction turned on and terminal mode entered
  53.   in 8 bit graphics format.  Just copy this line, make a new label, add a
  54.   new number and you're all set with a new phone directory entry...
  55.     
  56. pcmag   bye; sp 2400   1-212-503-5255 ena -E;t -8g    :PC Magazine BBS
  57.                         
  58.                         ------------------------------
  59.     
  60.   I have tried to make this script as perfect as possible but like most 
  61.   things in life there are no guarantees that I found everything.  I wish
  62.   you the best of luck with YAM or ZCOMM.  Please let me know if you run 
  63.   into problems...
  64.                     
  65.   I have spent hundreds of hours over many years on this script to make 
  66.   ZCOMM or YAM useful to new users right out of the starting blocks.  If
  67.   this has helped you get a better grasp of the package I would like 
  68.   to hear from you.  If this really made a difference, and you think my 
  69.   time is was well spent, throw a couple bucks my way and I will go out
  70.   for a taco... 
  71.  
  72.   Whatever you decide, I would appreciate a postcard, just to get an 
  73.   idea who this script finally reached...
  74.  
  75.                                             Michael Ash
  76.                                             3766 Tupelo Ln #2904
  77.                                             San Antonio, TX 78229
  78.  
  79.  
  80.                       ---------- Have Fun ----------
  81.  
  82.     
  83. ::----------------------------------------------------------------------------::
  84.     
  85.          -- Special AutoSense Dialing Script with speed fallback --
  86.  
  87.   Below is specialized code you don't need to concern yourself with.  If you
  88.   want to change the default menu colors or the initial generic modem string,
  89.   search for the character <*> to direct you to those parts of the code. Again
  90.   this is optional since 95% of the users out there will be able to use the
  91.   script as is.
  92.     
  93.   The dial routine below replaces internal YAM/ZCOMM carrier detect code...
  94.   This dialing routine is called by the first line in 'setup' section of code
  95.   by the command:  set mcommand "gosub dial"
  96.  
  97.   Calls you make with your modem at 2400 baud that connect to 2400, 1200, 
  98.   or 300 baud modems on the other end will automatically change your modem 
  99.   speed to match.  It is IMPORTANT to give Xn value in modem setup string the
  100.   highest number available to insure your modem answer using full words, not 
  101.   just codes...
  102.  
  103.   To manual dial a voice call use construct: 'xxx-xxxxxv' where 'xxx-xxxx'
  104.   is the phone number you want to call from the command line followed by the
  105.   letter 'v'.  If you need more complex dial routines for mnp and high speed 
  106.   modems see 'mm224' label under PHONES.T provided with Professional-YAM or 
  107.   download SCRIPTS.ZOO from the scripts subdirectory on Telegodzilla, the 
  108.   YAM/ZCOMM support BBS.
  109.         
  110. dial    pat     :Clear old patterns        
  111.      
  112.         if "%telno<2" echo "\n\nPhone number must be at least 2 numbers\n\n"; return
  113.         bye                   : %telno is string containing phone number 
  114.      
  115.         if "%mprefix<2" goto mandial   :If no modem prefix defined (e.g. ATDT)
  116.                                        :This allows for manual phone dialing.
  117.         pat 0c "v"                     :Search for "v" voice call 
  118.                                        :Below list possible messages from modem
  119.         pat 1 "CONNECT\r\n"  ; pat 2 "NO CARRIER" ; pat 3 "BUSY" ; pat 4 "RING"
  120.         pat 5l "CONNECT 1200" ; pat 6l "CONNECT 2400"  ;  pat 9 OK
  121.  
  122.         dis -d      :disABLE carrier lost message (ver 17.04+ not needed)
  123.         put %mprefix; putw %telno\r    :Send dial prefix (e.g. ATDT) and phone #
  124.      
  125.         if !0  goto nov :Skip instruction if not a voice call (eg not a ';')
  126.         echo "\n\n\n\n\n\t\t\t Voice Calling in Progress...\n\n"
  127.         echo "\t\t    >>> Once phone ringing Hit RETURN <<<\n\n"
  128.         if y bye ; return        :once key hit, hang up modem...
  129.  
  130. nov:    
  131.         wait -f72
  132.         while "4&&!L>3" wait -f40       :while ringing less then 4 times wait
  133.         if "n||2||3||9" echo "No connection made..." pat; o; fail
  134.     
  135.         while "!c&&L<20"  sleep 1       :wait for slow carrier detect
  136.         if 5 sp 1200 goto gotit         :setup for 1200 baud connection
  137.         if 6 sp 2400 goto gotit         :setup for 2400 baud connection
  138.         if 10 sp 300                    :ugh a 300 baudy line...
  139.  
  140. gotit:  set telno ""                    :erase telephone number from variable
  141.         return
  142.  
  143.         :: If modem prefix string less than 2 characters, Manual dialing
  144.         :: is assumed.  This allows the special case where you may have
  145.         :: to have an operator make the call (or dial manually on phone)
  146.         
  147. mandial:  
  148.         : putw "ATZ\r"        :put modem in standard configuration
  149.         echo "\n\n\n     Please dial %telno... \n"
  150.         lput "     Once dialed wait for FIRST RING then hit F1 and hang up the phone!  "
  151.         t             :Put into terminal mode to prepare modem...
  152.         put "ATD\r"   :Force modem to answer
  153.         echo "\nIf you want to have MODEM do the dialing hit Shift-F6 and change option...\n"
  154.         return
  155.  
  156. ::----------------------------------------------------------------------------::
  157. ::                                                                            ::
  158. ::              >>>  This SETUP script is where it all begins <<<             ::
  159. ::                                                                            ::
  160. ::      In both Professional-YAM and ZCOMM "setup" is the first subroutine    ::
  161. ::      executed.  In a departure from the standard PHONES script, this       ::
  162. ::      version of the phones file actually looks for another file called     ::
  163. ::      PROFILE.DAT where specific setup information is stored.  If this      ::
  164. ::      file doesn't exist, this script will actually write the code.  This   ::
  165. ::      allows for easy menu modification of things like PORT number and      ::
  166. ::      Dialing Prefix.  Once an entry is made using the menu, a new          ::
  167. ::      PROFILE.DAT file is written to disk and used in the future to load    ::
  168. ::      saved setup information.  The examples assume the modem responds      ::
  169. ::      to the HAYES command set and either COM1 or COM2 connected to a       ::
  170. ::      modem.  Others can modify the script for their application...         ::
  171. ::                                                                            ::
  172. ::      This allows for easy setup modification without the use of an editor  ::
  173. ::      to change configuration information -=- especially useful to laptop   ::
  174. ::      users out there who may need to quickly change dialing configuration  ::
  175. ::      while on the road.  Setup code has been moved to the bottom of the    ::
  176. ::      script since it is run only once at startup...                        ::
  177. ::                                                                            ::
  178. ::----------------------------------------------------------------------------::
  179.  
  180. setup:  lput "\r\n\n...working\r\n\n"  goto do_it    :skip to 'setup' code
  181.  
  182.  
  183. ::============================================================================::
  184.  
  185. ::     --- Some San Antonio Bulletin Boards using simple Phone Directory ---
  186. ::     Remember if you are out of the area you must add (512) area code...
  187.  
  188. apco24     bye; speed 2400  496-5558 ena -E;t -8g  :membership board # 
  189. apco12     bye; speed 1200  496-5558 ena -E;t -8g
  190. public     bye; speed 1200  434-1557 ena -E;t -8g  :APCO public BBS
  191. chess      nolog speed 1200 494-5478 ena -E;t -8g  :Chess BBS
  192.  
  193. ::  Note to users -- Some of the above San Antonio bulletin boards operate
  194. ::  at speeds higher than 1200 baud.  If you have a 2400 baud modem, just
  195. ::  edit the 'speed 1200' to read 'speed 2400' as appropriate in the above
  196. ::  directory.  Want to add other favorites?  Just add them in with an ASCII
  197. ::  text editor using the above as example entries.  It's easy!  AreaCode=512
  198.  
  199. ::  To call one of these just give the command 'call buerg' for example...
  200.  
  201. ::                     --- Some Classic BBS systems ---
  202.  
  203. buerg24    bye; sp 2400   1-707-778-8944 ena -E;t -8g    :Vern Buerg's BBS
  204. buerg12    bye; sp 1200   1-707-778-8944 ena -E;t -8g
  205.  
  206. qedit      speed 1200 %l,404-296-9681 ena -E; kill :QEdit Sammy Mitchell (area 5)
  207.            restime; create -S+ %tmp\qedt%d.log ; t -8g
  208.  
  209. virusinfo  sp 2400 %l,408-988-4004 ena -E;t -8g  :John McAfee Viruscan -voice 408-988-3832
  210.  
  211. ::               -=- End of simple phone directory entries -=-
  212. ::  ---------------------------------------------------------------------------
  213.  
  214. menu:  cls                  :On screen Menu Generation...
  215.  
  216.   echo "                  >>>  YAM/ZCOMM Function Key Menu <<<                          "
  217.   echo "  Alt-N  EMERGENCY EXIT, 'Nuke It' to get out of trouble/escape a command       "
  218.   echo "                                                                                "
  219.   echo "  F1  Exit Circular Buffer            F2  Enter Circular Buffer                 "
  220.   echo "  F3  OPEN Capture file               F4  Send ASCII Text                       "
  221.   echo "  F5  Send Kermit Upload              F6  Send Zmodem Upload    <<BEST>>        "
  222.   echo "  F7  Receive CrcXmodem Download      F8  Send CrcXmodem Upload                 " 
  223.   echo "  F9  Press for THIS HELP SCREEN      F10 Online Manual                         "
  224.   echo "  Alt-1  Get DOS Command prompt       Alt-2  Get ZCOMM Command prompt           "
  225.   echo "                                                                                "
  226.   echo "  sF3  Holds you on-line...           sF4  Use Turbolearn Script Writer         "
  227.   echo "  sF6  Change YOUR defaults           sF7  Dialing Menu example                 "
  228.   echo "                                                                                "
  229.   echo "  aF1  AutoLog B&F Tech BBS (2400B)   aF2  AutoLog Olde Guard BBS (1200B)       "
  230.   echo "  aF3  CLOSE Capture file             aF4  CIS DEMO at 1200 baud                "
  231.   echo "  aF5  Call PC Magazine's BBS         aF6  Enter HOST MODE operation            " 
  232.   echo "  aF7  Sign name on-line...           ALT-F9  Edit PHOMAST.T script             "
  233.   echo "                                                                                "
  234.   echo " TO CALL OTHER BBSs: enter 'call name' where name is a label -=- LD service \45l, "
  235.   echo "    >>To DIAL A NUMBER just enter number followed by ;t  (e.g. 523-8994;t)<<    " 
  236.   echo "       -- CompuServe-B, KERMIT, and ZMODEM download automatic --                "
  237.   echo "  Stop Redialing ---- press <CR>      Hangup w/o pgm exit  - enter 'o'          "
  238.   echo "  PgUp into Buffer; <CR> to return    -> EXIT hit F1 then -- enter 'off'        "
  239.   return 
  240.   
  241.                           --------------------------------
  242.  
  243. capture:                      :called by F3 to generate capture file...
  244.         acceptl1 s1 "\r\n\n\t Do you want to save what has already past as well (Y/n)? "
  245.         if is1,n  kill      : kill old buffer and start new...
  246.         accept s1 "\t Enter name of Capture File: " create -S+ %s1 lput "\r\n" 
  247.         return
  248.  
  249. ::                              ---------------------
  250.  
  251.         Here is a slick way to stay on-line in systems that will log you 
  252.         off if you don't hit the keyboard...  Below is an example of how 
  253.         to use text positioning (Now Active) to make this happen. 
  254.         
  255. hold:   lput "\E[s\E[f\E[33m"  :save cursor position, move to top line, change color
  256.         lput "══════════════════  \E[3m\E[5mHOLDING...\E[0m\E[33m Press SPACE-BAR to continue!  ═════════════════\E[0"
  257.         lput "\E[u"     :restore cursor to line where it was called
  258.         
  259.         :: The line below sends to remote what ever is stored in variable s8 
  260.         :: (usually space,BS define at 'setup') until a key is hit (!k). It 
  261.         :: allows you to modify what is sent to remote to hold.  For example
  262.         :: on a VT emulation you would use set s8 " \177" for space, backspace/
  263.         :: delete.
  264.  
  265.         while "!k" putw %s8  sleep 20   :While no keyhit keep adding chars
  266.         
  267.         lput "\E[f"     :put cursor on top line 
  268.         lput "\E[33m════════════════════════════════  ON-LINE  ═══════════════════════════════════\E[0m"
  269.         lput "\E[u"     :restore cursor to line where it was called
  270.         
  271.         return          :return to calling code
  272.  
  273.  
  274. ::----------------------------------------------------------------------------::
  275. ::                     --- Color Generation examples ---
  276. ::     To see this just give the command 'gosub color' from the prompt...
  277.  
  278. color:
  279.      cls; echo "\n\t\t\t\E[32m\E[41m >>> ANSI Color Calls <<< \n"
  280.      echo "All that is required is you precede the text you want in color with \\E[xxm."
  281.      echo "For example: { echo \" This is \\E[32mGREEN\\Em\" } will make GREEN green.\n"
  282.      echo "Foreground:\n"
  283.      lput "\E[47m\E[30m\\E[30m\E[40m  \E[31m\\E[31m  \E[32m\\E[32m  \E[33m"
  284.      lput "\\E[33m  \E[34m\\E[34m  \E[35m\\E[35m  \E[36m\\E[36m  \E[37m\\E[37m"
  285.  
  286.      echo "\n\nBackground:\n"
  287.      lput "\E[40m\\E[40m \E[30m\E[41m \\E[41m \E[42m \\E[42m \E[43m \\E[43m "
  288.      lput "\E[44m \\E[44m \E[45m \\E[45m \E[46m \\E[46m \E[47m \\E[47m \n\n"
  289.  
  290.      echo "Modifiers (primary here is green):\E[32m\n"  :Switch foregrd back to green
  291.      lput "\E[0mReset,  Bold, Faint, Italics, Underline,    Blinking,"
  292.      lput "    Reverse, Invisible\n\r"
  293.  
  294.      lput "\E[0m\\E[0m   \E[1m\\E[1m \E[2m\\E[2m\E[0m   \E[3m\\E[3m\E[0m     \E[4m\\"
  295.      lput "E[4m\E[0m    \E[5m\\E[5m or \\E[6m \E[0m  \E[7m\\E[7m\E[0m     \\E[8m"
  296.  
  297.      echo "\E[36m\E[22f\t\t   Notice \\E[22f puts cursor on 22rd line...   \E[23f"
  298.  
  299.      lput "\t\t\t  Hit Any Key to continue..."
  300.      ife y  ;          :basically a no-op wait for keystroke (nul else nul)
  301.      
  302.      cls; echo "\E[21f\t\t\t>>> All Numeric Color Calls <<<"
  303.      set s0 0
  304.      p#255; p$5; cls; display noautowrap
  305.      while L<129 obey "pn%s0" lput "\E[m %s0  \r\n" setn s0 s0+1
  306.      pn130; p$80; p#24; lput "\E[10;H\E[m"
  307.      pn1055; lput "\n\t\t\t\E[mFor \E[5mBLINKING\E[m text just add 128\r\n\n"
  308.      lput "\t  Possible colors for: *, @, n, r, s and u Numeric Parameters\r\n"
  309.      lput "\t  where: *=highlite (color shown when text in circular buffer is\r\n"
  310.      lput "\t  marked), @=messages, n=normal text, r=reverse, s=status, u=underline."
  311.      lput "\r\n\n\t  Use these number in the following format 'px#', where x is the\r\n"
  312.      lput "\t  parameter choice (e.g. n,r,s etc.) and # is the color number\r\n" 
  313.      lput "\t  above... For example pn2 give light green color to normal text.\n\n\n\n\r"
  314.      return
  315.  
  316. :==============================================================================:
  317. :                      --- Auto Logon Examples --                              :
  318.  
  319. bnf : Autolog onto the Back and Forth Technical Support BBS.  This is a
  320.     : board I talk to more than all others.  This programming below
  321.     : demonstrates an example of an autolog script for WildCat BBS.
  322.     
  323.     : Comment in the line below once you have a password, if you want to enter
  324.     : it and not have it done automatically...
  325.     
  326.     : cls; accept s1 "\E[21f\E[36m\t\t\tEnter your Password now: \E[8m"
  327.     
  328.     cls ;  echo "\n\n\t\t   Calling B&F Support (Line 1)...  TURBO Mode \n"
  329.     echo "\t\t       -- If no answer try 'call bf2' -- \n\n"
  330.     lput "\t\t Are you calling from the San Antonio Area (y/N)? "
  331.     ife y nolog lput "\r\n\n" speed 2400 670-0954 ena -8g goto go; else lput "\r\n\n"
  332.     speed 2400 %l,512-670-0954 ena -8g     :Default of long distance call...
  333.                                            :Note %l, for long distance prefix
  334.                                            
  335.     goto go   : The 'nolog' command above will prevent local call logging to
  336.               : the 'calllog' file.
  337.  
  338. bf2 cls; echo "\n\n\t\t   Calling B&F Support (Line 2)...  TURBO Mode \n\n"
  339.     lput "\t\t Are you calling from the San Antonio Area (y/N)? "
  340.     ife y nolog lput "\r\n\n" speed 2400 670-1809 ena -8g goto go; else lput "\r\n\n"
  341.     speed 2400 %l,512-670-1809 ena -8g   :Long Distance using %l, service
  342.  
  343. go: cd %tmp        : UNCOMMENT NEXT LINE once you have a password defined...
  344.     : lput "\n\n\n Please Standby...  "; display inhibit  
  345.     : pat 5ci "N]on"  "n"     : Watch for N]onStop incase it's there...
  346.     
  347.                     
  348. ::  Note you will have to log-on manually first to get a password on this
  349. ::  system.  Since you don't have a password assigned, the line below
  350. ::  skips the rest of the auto log-on and hooks you to this BBS.
  351. ::  When you have a name and password, add them in the 'putw' statement
  352. ::  BELOW and DELETE (or comment out) the NEXT line and uncomment 
  353. ::  lines above ('lput "\n\n\n Please Standby..." and 'pat...')
  354.  
  355.          goto bv  :just put to codeset that watches for carrier...
  356. ::       ^^^^^^^^^:delete this after name/password loaded below!
  357.     
  358.     
  359.     pat 1i "Name? " ; wait; put "PUT YOUR LOGIN NAME HERE\r"
  360.     pat 1i "word: " ; wait; put "PUT YOUR PASSWORD IN HERE\r"
  361.     :  pat 1i "word: " ; wait; put "%s1\r"  :if you used passwd prompt above
  362.     
  363.     display noinhibit; lput "Account verified...  "; display inhibit
  364.     pat 1i "    " ; wait; put " "
  365.     pat 1i "[y/N]" ; wait; put "n"
  366.     
  367.     display noinhibit; lput "Login Complete... \n\n "
  368.     
  369.     ::                    >>> Alarm Section <<<
  370.     
  371.     display nobell=visual               :Turn bell back ON 
  372.     lput "\r\n\n\t\t  Hit *BACKSPACE* key to \E[3m\E[5mSTOP\E[0m alarm..." 
  373.     sleep 30                 :Give 3 seconds for response before alarm 
  374.     while "!k&&L<20" lput "\7\7"        :For 20x and While nokey, make noise 
  375.     if k goto bv                        :If keyhit then skip next call 
  376. bv: : cls
  377.     display bell=visual                 :quiet bell 
  378.     pat                                 :clear patterns
  379.     pat 1i "Thank you for calling"      :watch for goodbye from BBS
  380.     pf3                                 :set check wait for 3 second
  381.     while "!1&&c" wait                  :while carrier present wait here
  382.     echo "\n\n"
  383.     return
  384.  
  385. :            --- An example of a TComm BBS that has ZCOMM users ---
  386.  
  387.     
  388. oldguard  cls; echo "\n\t\t       Now calling Olde Guard at 1200 Baud \n\n"
  389.           
  390.           : Note I have default from menu to call at 1200 - just change
  391.           : entry for 'set fa2' to oldg24 if you want 2400 by default.
  392.           
  393.           ena -E -Z -8g                 :enaBLE Error ck, auto d/l, w graphics
  394.           nolog; speed 1200             :turn off log and set speed 1200 baud
  395.           goto number                   :Skip 2400 baud dial
  396.  
  397. oldg24    cls; echo "\n\t\t       Now calling Olde Guard at 2400 Baud \n\n"
  398.           ena -E -Z -8g                 :enaBLE Error ck, auto ZModem w graphics
  399.           nolog; speed 2400             :turn off log and set speed 2400 baud
  400.  
  401. number:   
  402.           lput "\t\t Are you calling from the San Antonio Area (y/N)? "
  403.           ife y nolog lput "\r\n\n"  684-4470 ena -8g goto go; else lput "\r\n\n"
  404.           %l,512-684-4470               :Long distance  (outside San Antonio)
  405.                                         :Note the %l, selects Long Distance service
  406. go:       cls
  407.           : echo "\E[34m\n\n\t\t >>> Welcome to Olde Guard BBS -- Please standby <<<"
  408.           : display inhibit             :turns off display for opening setup...
  409.                                         :(use this to not show opening screens)
  410.           ena -E -Z -8g                 :enaBLE Error ck, auto ZModem w graphics
  411.           pat; pat 1i "ENTER"           :Clear patterns and look for ENTER
  412.           wait                          :Wait for pattern
  413.           : put "\rn\ry\r\r"              :REQUEST graphics and color
  414.           put "\r\r\r"                  :SKIP graphics and color
  415.           restime                       :Reset status clock  (Yam Only)
  416.           pat 1i "right (y/N/why)?"
  417.           wait                          :wait for tcomm...
  418.           : display noinhibit           :turn display back on if off
  419.           : pat 1i "~~"; wait           :Watch and for opening screen 
  420.           : put "\013"                  :Once found Ctrl-K out of it...
  421.           pat 1i "ast name: "           :Look for log in prompt
  422.           wait                          :Wait until prompt occurs
  423.                     
  424. ::        Note you will have to log-on manually first to get a password on Olde
  425. ::        Guard...  Since you don't have a password assigned, the line below
  426. ::        skips the rest of the auto log-on and hooks you to the BBS.
  427. ::        When you have a name and password, add them in the 'putw' statement
  428. ::        BELOW and DELETE (or comment out) the NEXT line...
  429.  
  430.           goto bv  :just put to codeset that watches for carrier...
  431. ::        ^^^^^^^^^:delete this after name/password loaded below!
  432.  
  433.           putw "FIRST LAST NAME\rPASSWORD\r"     :Enter name / password
  434.  
  435. ::        --- Note comment out next four lines if you want bulletins ---
  436.           pat 2i "=="              :Look for bulletin menu if turned on
  437.           wait                     :wait until found...
  438.           put \013                 :Ctrl K to skip this menu
  439.           put "q\rm\r"             :Drop to mail menu level to prevent timeout
  440.           
  441. ::                            >>> Alarm Section <<< 
  442.  
  443.           display nobell=visual           :Turn bell back ON 
  444.  
  445.           lput "\r\n\n\t\t\E[33;1m  Hit *BACKSPACE* key to \E[5;31mSTOP\E[0;33m alarm..." 
  446.           : lput "\r\n\n\t\t  Hit *BACKSPACE* key to STOP alarm..." :no ANSI
  447.  
  448.           sleep 30                        :3 sec for response before alarm
  449.           while "!k&&L<20" lput "\7\7"    :For 20x and While nokey, make noise 
  450.           if k goto bv                    :If keyhit then skip next call 
  451.           
  452. ::        Put other DOS noise making program here if you wish, for example
  453. ::        !sound  (note the '!' will execute DOS programs from inside script)
  454.  
  455. bv:       : cls
  456.           display bell=visual                :quiet bell 
  457.           : put "r\r"                        :Prepare to read mail. (off now)
  458.           pf30                               :Reset search wait (30 sec)
  459.           kill                               :Clear circular buffer
  460.           restime                            :Reset the timer (YAM only)
  461.           :  create -S+ %tmp\mail%d.log      :Strip all ANSI, append date file
  462.              ::^If today was 5/25/90 this makes a file in c:\zcomm
  463.              :: called mail0525.log -- If you need to use a DOS program on
  464.              :: this filename use the syntax @!% [DOS program] mail%d.log
  465.              :: to force YAM/ZCOMM to fill in the date before passing to DOS
  466.              
  467.           : cd %tmp                          :Change directory to d/l area 
  468.       
  469. ::        Three lines below show how to check for connection to host system
  470. ::        every 3 seconds.  Once connection is lost you are returned to YAM
  471. ::        command-line.  This is a useful piece of code if you wanted to have
  472. ::        a call placed from a DOS menu and return to DOS menu when the call is
  473. ::        completed.  If this is the case you would replace 'return' with 'off'
  474. ::        and have YAM/ZCOMM return to DOS after this call is completed.
  475.  
  476.           pf3                 : set pattern fail time to 3 seconds
  477.           while c wait        : While connected just wait here...
  478.           return              : once no carrier, return to command line.
  479.  
  480.  
  481. :---------------------------------------------------------------------------:
  482. :           --- Example of an auto logon script for CompuServe ---          :
  483.  
  484. cis       cls; bye      :Note -- CIS access number for SAN ANTONIO, TX
  485.                         :You will need to modify for your local CIS number...
  486.           echo "\t Now accessing CompuServe at 2400 baud using the SA Texas number\n\n " 
  487.           speed 2401 435-3883     :Odd number, 2 stop bits, error trap 
  488.           goto cislog             :Goto logon section of CIS script 
  489.  
  490. cis12     cls; bye; echo "\t Now accessing CompuServe at 1200 baud using the SA Texas number\n\n "
  491.           speed 1200 435-3883     :local San Antonio TX access number...
  492.  
  493. cislog:   sleep 20                            :Sleep for 2 seconds
  494.           ena -E -7e   : put into Error correcting 7 bit, even parity...
  495.           echo ""; echo "Sending ^C"; put \3  :Send Ctrl-C, echo doing it. 
  496.           pattern 1i ID:                      :Wait for ID    
  497.           wait                                :"i" causes immediate release 
  498.           putw "77770,101\r"                  :Enter Account (can be yours)
  499.           pat 1i word:                        :Wait for password prompt
  500.           wait
  501.           putw "FREE-DEMO\r"                  :Enter password for demo...
  502.           pat 1i "word" ;wait
  503.           put "%s1\r"
  504.           cls;  echo "\n\n\t\t\tStandby for CIS to finish logon..."          
  505.           pat 1i ompu 
  506.           wait
  507.           restime                             :Reset YAM status timer 
  508.           putw "\20"; cls                     :Hit ^P to skip menu (\20 = ^P)
  509.                                               :Next line skips interrupt display
  510.           pat 1i "." ; wait; cls; lput "\r\n\nChoice: "
  511.           :  create -S+ %tmp\cis.log          :Setup appended capture file
  512.           :  cd %tmp                          :Change directory to d/l area 
  513.  
  514.           :Set: fULL duplex, B proto, strip ctrl char, don't pAUSE for {CR} 
  515.           ena -fcs!p  
  516.           kill                                :Kill initial login text 
  517.           restime                             :Reset status timer (yam only)
  518.  
  519.           while c wait                        :while carrier present wait here
  520.           : w; close                          :Write then close capture file... 
  521.           echo "\n\n"                         :This will put you back at the
  522.           return                              :command line once off line...
  523.           
  524.                  ----------------------------------------------------
  525.  
  526. telegodzilla           : Omen Technology (YAM/ZCOMM Upgrade BBS)
  527.                        : just give the command  'call -99 telegodzilla'
  528.  
  529.      pat 9 K\r\n; ena -d; cls          : Ck for OK, enaBLE carrier lost message 
  530.      putw "ATS7=100\r" ; wait -f1      : Change wait for connect to 100 sec
  531.      cls; echo "Demand Upgrade(TM): Omen Technology's TeleGodzilla system\n\n"
  532.      accept s7 "Please enter your LAST name: "; accept s6 "First name: "
  533.      :  set s6 "FIRST_NAME" ; set s7 "LAST_NAME" :Fill in and you can comment
  534.                                                  :out accept above and use this
  535.      speed 2400 %l,503-621-3746       :Call using phone account in '%l'
  536.      : speed 2400 1-503-621-3746      :Call using 1-503-621-3746 service
  537.      restime; kill                    :Reset time and Kill buffer
  538.      display overstrike; cls; pat 1 "ease:"; wait -f4
  539.      if "c&&!1" put "\r"; wait -f8
  540.      : if !1||!c echo "Access Failed"; o; fail
  541.      put "\b\b%s6 %s7\r"; pat 1 ect;wait -f2
  542.      put "y"; pat 1 "-Host"; wait -f5
  543.      : !sound  TeleGodzilla is on-line :uncomment if you have external alarm
  544.                                        :program (this one calls sound.exe)
  545.      cd %tmp
  546.      create -S+ %tmp/tele%d.txt        :Strip all ANSI, append to dated file
  547.      : sz -Z [filespec to upload]      :example of how to force file upload
  548.      
  549.      ::  If you uncomment one of the below you can select a file auto-download
  550.      : zcommand "sz -Z upgrade/yam.eqe upgrade/newest.meq upgrade/read.meq"
  551.      : zcommand "sz -Z upgrade/newest.meq"
  552.      : zcommand "sz -Z answer"
  553.      : zcommand "sz -Z rzsz*.* upgrade/newest.meq"
  554.      : putw "bye\r"; o
  555.      t -8g      :force terminal mode...
  556.  
  557. upgrade    speed 2400 %l-503-621-3746 t  :no frills calling telegodzilla
  558.  
  559. :                     --- End of Auto Log Examples ---                        :
  560. :=============================================================================:
  561.  
  562. ::         Generate a script with TurboLearn Script Writer(TM)  
  563. ::                    Hit Shift-F4 to start this...
  564.  
  565. tlearn    set fc10 "" :: telephone number, and flag that telno was entered
  566.      if c goto connected
  567.      cls
  568.      accept fc10 "Enter Telephone Number "
  569. ag1: accept fa1 "Enter Speed (300, 1200, 2400) "
  570.      if ifa1,2400 speed 2400 goto ag2
  571.      if ifa1,1200 speed 1200 goto ag2
  572.      if ifa1,300 speed 300 goto ag2
  573.      echo "Bad speed"; goback ag1
  574. ag2: lput "\r\n1 - System uses IBM PC (ANSI) line drawing characters\r\n"
  575.      lput "2 - System uses 7 bits even parity\r\n"
  576.      lput "3 - System uses 8 bits No parity (8n1)\r\n"
  577.      lput "\r\n"
  578.      acceptl1 fa2 "Choose one of the above: "
  579.      lput "\r\n"
  580.      ena -8n
  581.      @%fc10
  582.      if !c echo "Sorry, no connection"; return
  583.      set fa5 ""
  584.      if ifa2,1 ena -8g; set fa5 "ena -8g"
  585.      if ifa2,2 ena -7e; set fa5 "ena -7e"
  586. connected:
  587.      echo "Finish with F1.  Use ALT-B to send a break if necessary"
  588.      learn -y tlrn.tmp
  589. cn2: if !r echo "WARNING: Learning (recording) terminated prematurely!"
  590.      close
  591.      kill
  592.      create newscr.t
  593.      if !r abort
  594.      echo "Is this to become a Telephone Directory entry (y/n)?"
  595.      if !y goto nodir
  596.      accept fa6 "What directory entry name to use? "
  597.      echoc "%fa6    speed %fa1 %fc10 %fa5"
  598. nodir:    close;  set fa2 ""
  599.      echo "Should the script disconnect the phone line (y/n) ?"
  600.      if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
  601.      set fa2 "bye;  return"
  602.      echo "Should the script then exit to the Operating System (y/n)?"
  603.      if y  set fa2 "off"
  604.      !tlearn -r tlrn.tmp >>newscr.t
  605.      create -+ newscr.t; echof "   %fa2";  close
  606. scdone:   echo "Your new script is in the file 'newscr.t' !!"
  607.      if %fc10 echo "You may add this file to your Telephone Directory"
  608.      if %fc10 echo "Or execute it with 'call %fa6.newscr.t'";  return
  609.      echo "You may execute this file with 'source newscr.t'"
  610.      return
  611.  
  612.                 
  613. :=============================================================================:
  614.  
  615. ::                    ---  Using YAM/ZCOMM in HOST MODE  ---
  616.  
  617. ::      Note that for maximum -security- have this section be another file
  618. ::      so users won't see your passwords.
  619.  
  620.  
  621. ::      YAM users can uncomment 'demand %password' line at end of file
  622.  
  623. host    cls; echo " Activating host mode operation...  Stand by!\n\n"
  624.         sp 2400
  625.         : sp 1200                   : use for 1200 baud host modem...
  626.         : set home "/HOST"          : Optional restricted directory 
  627.         
  628. ::    The above command can force users into a specific area on disk.  It 
  629. ::    CRITICAL you use "/" NOT a "\" in this command.  This will lock users
  630. ::    into that directory and its subdirectories.  If you use this 
  631. ::    command, you MUST have your welcome and xhelpfile as a different
  632. ::    file and this file MUST be in the directory specified by the 'set
  633. ::    home' command.  To function it MUST be a READ ONLY file.  You may
  634. ::    use HOSTHELP.TXT for this purpose but it will need to be renamed to
  635. ::    HOSTHELP.T.  Remember you will also need to add some starting 
  636. ::    labels and utilize new 'set welcome' and 'set xhelpfile' commands.
  637.  
  638.         set welcome "@gosub welcome.%phones"  : setup Welcome
  639.         set messages "/zcomm/messages"        : setup file for messages
  640.         
  641. ::    Private should set to another directory so people won't see 
  642. ::    private messages, since when HOST restricted they can change from %home
  643.  
  644.         set private "/zcomm/pmessage"         : Setup private message area
  645.         
  646. ::    Normally section below would be in another file so people could NOT
  647. ::    view your passwords.  For testing you can get around this by assigning
  648. ::    your script a READ-ONLY, HIDDEN attributes.  For YAM users wanting to
  649. ::    use the 'demand %password' option, the file CAN NOT have a HIDDEN 
  650. ::    attribute so you MUST put this in another directory that users can't
  651. ::    access for protection.
  652.  
  653.         set password "xxxxxxxx"   : CHANGE THIS Access Password 
  654.         set unrestrict "xxxxxx"   : WARNING - CHANGE THIS DOS drop PASSWORD!!
  655.  
  656. ::                     -- HOST Helpfile Defined Below --
  657.  
  658.         set xhelpfile "@gosub help.%phones"  : Custom help 17.29+
  659.         : set xhelpfile "@type hosthelp.txt>com1"    : (older versions)
  660.                                            :^^^^ set this for com1 or com2
  661.                                            : Notice this is an EXTERNAL file!
  662.                                            
  663.         set disks "abc"                    : Setup restricted disk area
  664.  
  665.         set call1 "ATZ\r\336\336ATZ\r\336\336"  :prepare to answer phone...
  666.         set call2 "ATZ\r\336\336ATM1X1S0=1\r\336ATM1X1S0=1\r\336\336"
  667.  
  668.         :       Note 'call3' below would normally be a command that
  669.         :       requires quotes around it, but it includes a quoted string
  670.         :       so you MUST use this alternate form of the set command to
  671.         :       have the actual command start at COL #1 of the next line.
  672.         :                 <<< This works with YAM only...>>>
  673.  
  674.         : set call3
  675. : @echo "\t\t Now awaiting incoming calls... Press F1 to exit.\n\n"
  676.  
  677.         set answerback "\r\nYOUR NAME HERE...\r\n\21"
  678.  
  679.         set outahost "@pk512; putw ATE1V1X1S7=60S8=1S11=50S0=0\r;pwd; gosub menu"
  680.    
  681.                  
  682.         set baudstr "@gosub baud"               : sub below to find speed
  683.         pc60                                    : callout interval = 60 sec
  684.         host
  685.   
  686.         :               >>> Check for Caller Speed <<<
  687.         
  688. baud    pat 1 "CONNECT\r\n"; pat 2 "NO CARRIER"
  689.         pat 3 "CONNECT 1200\r\n"; pat 4 "CONNECT 2400\r\n"
  690.         pe-20
  691.         wait -Ef25
  692.         dis -E
  693.         if 1 speed 300 return
  694.         if 3 speed 1200 sleep 20 return
  695.         if 4 speed 2400 sleep 20 return
  696.         kill create -+ rings
  697.         close
  698.         fail
  699.   
  700. welcome:
  701.             :In HOST mode, below is what the user will see on login 
  702.  
  703.     echo "                     >>> Welcome to YAM/ZCOMM Host Mode <<<                    "
  704.     
  705.     : demand %password    :YAM users may uncomment to request password
  706.  
  707. ::    The 'demand' command is only available in YAM and NOT in ZCOMM...
  708. ::    If you are using ZCOMM there is no way to restrict initial access
  709. ::    like you can with YAM.  ZCOMM CAN will RESTRICT access to DOS if
  710. ::    user doesn't know the password ...
  711.  
  712. help:       :Note this is also the help message...
  713.     echo "                                                                               "
  714.     echo "        The thing to remember is that when you see the prompt followed         "
  715.     echo "        by [HOST] it is like you are actually sitting at the host              "
  716.     echo "        terminal...  To execute commands on your own YAM/ZCOMM hit F1          "
  717.     echo "        to call your local terminal program...                                 "
  718.     echo "                                                                               "
  719.     echo "        To open access to the complete disk enter the command: UNRESTRICT      "
  720.     echo "        and then use the system password -- otherwise you will remain in       "
  721.     echo "        the C:\\zcomm directory or one of its subdirectories.                   "
  722.     echo "                                                                               "
  723.     echo "        To see the files on the host enter: 'dir' and hit return.              "
  724.     echo "                                                                               "
  725.     echo "        TO DOWNLOAD a file from the host enter 'sz filename' (wildcards OK)    "
  726.     echo "            (Remember this is just like typing at the HOST keyboard...)        "
  727.     echo "                - For XMODEM enter 'sx filename' at HOST prompt -              "
  728.     echo "           - For KERMIT enter 'kermit sb filename' at Host prompt -            "
  729.     echo "                                                                               "
  730.     echo "        TO UPLOAD a file hit F1 to get into your terminal command mode and     "
  731.     echo "        then enter 'sz filename'.  In ZModem everything else is automatic.     "
  732.     echo "        XMODEM enter 'rx filename' or 'rc filename' for CRCX at HOST prompt    "
  733.     echo "        - KERMIT enter 'kermit rb' at HOST prompt then start your upload -     "
  734.     echo "                                                                               "
  735.     echo "        To leave a MESSAGE enter the command 'message' and follow prompts.     "
  736.     echo "          ---> To see this message anytime enter the command 'help' <---       "
  737.                                                                                       
  738.  
  739. ::-----------------------------  End of Host Mode ----------------------------::
  740.  
  741. ::------------------------------  Start of Setup  ----------------------------::
  742.  
  743.         : This code segment called from 'setup' label... First thing is to
  744.         : test for the existence of 'PROFILE.DAT' the user's default file.
  745.         
  746. do_it:  cd %home        :first make sure you're in the home directory.  There 
  747.                         :are lots of variables, %variable_name activates them.
  748.                         :To see the various variables enter 'set' at the DOS
  749.                         :prompt to see DOS environment and 'set' at YAM/ZCOMM
  750.                         :prompt to see the local variables.
  751.         
  752.         if !fPROFILE.DAT gosub make_profile  :If PROFILE.DAT not found make one
  753.         
  754.         : Initialize Shift-F6 early in case fatal error in PROFILE.DAT produces
  755.         : crashed state (as would happen if you copy the PROFILE.DAT to a system
  756.         : with a different configuration and didn't reinitialize).
  757.         
  758.         set fs6  "@gosub reset"   :Resets PROFILE.DAT containing modem dialing info
  759.  
  760.         source profile.dat      :read and activate PROFILE.DAT file...
  761.         
  762.         set mcommand "gosub dial"   
  763.         : The above ^ skips internal dial routine allowing for autospeed sense
  764.         
  765.         ena -d                  :suppress the Carrier Lost msg during setup
  766.         : ena -D                :establishes a 2 second timing loop for line hits
  767.                                 :(use for call waiting where you can't disable)
  768.         : pa4000                :use for clones running 8 MHz and above...
  769.         pd1                     :turn on time stamping
  770.         pi10                    :set redial for 10 seconds...
  771.         : pt4  :default throttle of 20 char/sec (lower is faster) (see F4)
  772.         pT3                     :set histfile to save commands only if 3 char+
  773.         pv-1                    :Verbose OFF (-1 shows none; 50 shows all)
  774.         pz360                   :set CST timezone (could use DOS: set ZONE=360)
  775.         : p-1                   :for those using MKS ToolKit UNIX Shell
  776.                                 :There are many 'p' parameters you can set, 
  777.                                 :these are just examples of some useful one.
  778.  
  779. ::      --------------------------------------------------------------------
  780.                     
  781. ::      The option below allows you to hit an up arrow key to use past 
  782. ::      commands by setting up a history file.  Since all keystrokes are
  783. ::      recorded (including passwords), the 'onexit' command will delete 
  784. ::      the history file when you finish your communications session.  Of
  785. ::      course, you could have more protection by writing over the file with
  786. ::      another.  To do this replace the 'del c:\histfile' with something like
  787. ::      '!copy \command.com \histfile'.  This will write over your history file
  788. ::      with a copy of command.com.  Usually this file deletion is adequate.
  789.  
  790. ::      If you don't want to use this history file option just put a ':' in 
  791. ::      front of the command since anything preceded by a ':' is considered
  792. ::      to be a comment.
  793.  
  794.         history c:\histfile   : Setup command line buffer (here in root)
  795.         
  796.         : Note the special construct below.  Since there are quotes in the 
  797.         : string, it is put on two lines and will delete histfile on exit...
  798.         : The '\n\n\t' string means two Newlines then TAB over a mark.
  799.         
  800.         set onexit 
  801. @cls; history; del c:\histfile ; echo "\n\n\t\t\t History file deleted... "; sleep 5
  802.                                                        
  803.         display bell=visual     :turns off bell, comment with ':' for bell
  804.  
  805. ::                             --------------------        
  806.  
  807.       :  if c goto online          :if carrier detected skip modem setup.  
  808.  
  809. ::    The above line allows you to check the carrier status when YAM/ZCOMM is
  810. ::    loaded.  This means you can take full advantage of the eXit to DOS 
  811. ::    function.  Anytime you are on-line you can get to the command line by
  812. ::    hitting F1 then enter 'X'.  What this does is unload the communication
  813. ::    program but leaves the modem and serial port active.  Then you have full
  814. ::    access to DOS and can return on-line as long as the host doesn't time
  815. ::    out (while you are working at the DOS prompt).  Once through with DOS,
  816. ::    re-load YAM/ZCOMM like you did initially and WHAM -- you're back on-line
  817. ::    as if you had never left...
  818.   
  819. ::    To activate remove the ':' from in front of 'if c goto online'.  This
  820. ::    will prevent YAM/ZCOMM from reinitializing the modem.  Then continue and
  821. ::    search for the line 'Second part of testing for on-line conditions' and
  822. ::    comment out the command 'fail'
  823.  
  824. ::                         --- Check Modem Status ---
  825.  
  826.       cls;  lput "\r\n\n\n\t\t\t>>> Modem setup in progress <<<\r\n\n"
  827.         
  828. ::    Below is an example of how to use color and graphics (now turned off).
  829.  
  830.         : echo "\n\n\n\t\t    ╓──────────────────────────────────────╖"
  831.         : echo "\t\t    ║ \E[44;1;33m   >>> Modem setup in progress <<<  \E[0m ║"
  832.         : echo "\t\t    ╙──────────────────────────────────────╜\n"
  833.         
  834.         sp 1200                           : Initially set up speed at 1200 baud
  835.         pat 9 K\r\n                       : Check for OK from modem
  836. rc:     put "AT\r"; wait -f3              : Hayes 'AT' then wait up to 3 sec for OK
  837.  
  838.         :   Modems using stored profiles can have initialization done here
  839.         :   by replacing "AT\r" with ATZ0\r".  Remember you first have to 
  840.         :   initialize and store modem string before this functions correctly.
  841.         :   "ATZ0\r" recalls Hayes Profile 0 if already defined.  If this
  842.         :   is done you can have the script skip further modem setup strings...
  843.         
  844.         if 9 goto modset                  : If Modem on (OK) skip error msg
  845.         lput "\E[4f                                                        "
  846.         lput "\E[5f\t\t  Please turn your modem OFF then back ON,\r\n"
  847.         lput "                                  - OR -                           \r\n"
  848.         lput "\t\t   Hit SHIFT-F6 to change your setup..."
  849.         sleep 20                          : You get 2 seconds to turn it on!
  850.         goback rc                    : Check modem again...
  851.  
  852.    --------------------------------------------------------------------------
  853.  
  854. :: <*>     --- Some of the common MODEM SETUP commands definitions ---
  855.  
  856. ::  &C1=Data Carrier Detect  &D2=hang up with change in DTR 
  857. ::  E1=modem echos commands back to terminal  V1=Word result codes
  858. ::  &W=Save config to nonvolatile memory  L=speaker low
  859.  
  860. ::  X4=Detect dial tones and busy signals; enable extended result codes.
  861. ::     With this activated (default for most modems) status messages are
  862. ::     sent to the screen about modem activity.  English words instead of 
  863. ::     number codes are displayed on the screen. 
  864.  
  865. ::  S0=answer rings  S6=dial tone wait  S7= wait for connect  S8=pause for ","
  866. ::  S9=Carrier det response  S10=delay carrier lost and hangup  S11=dial speed
  867.  
  868. ::  Remember if your modem doesn't hang up correctly ADD '&D2' to the string.
  869.  
  870. modset:
  871.         putw "AT E1 V1 X1 S0=0 S7=60 S8=2 S11=60 \r" :Normal 1200 baud setup
  872.                                                      :the default setup!
  873.                                                      
  874.         :       -- Line below is an alternate 1200 baud setup command --
  875.         :  putw "AT E1 Q0 S0=0 S6=3 S7=40 S8=2 S10=10 S11=50 V1\r" ; wait -f2
  876.         
  877.         :: -- Line below supports Hayes/Zenith 2400, Compaq LTE/286, NEC Ultra
  878.         :  putw "AT E1 L X4 V1 &C1 &D2 S0=0 S6=3 S7=60 S10=10 S11=60\r"
  879.  
  880.         :  put "AT E0 V1 X4 &D2 \r"           :for Everex 2400 baud
  881.         
  882.         :  putw "AT &C1 &D2 E1 &Q0 L1 S7=100 S11=50 \r" :Simple Hayes V-9600
  883.         ::       ^^ Once stored using ATW0 it's in PROM, ATZ0 below gets it...  
  884.  
  885. ::         -- A suggested ZOOM 2400 baud modem setup is listed below --
  886.  
  887.         :  handshake both        : Handshakes both CTS or XOff
  888.         :  putw "AT &C &D2 &L0 C1 X5 S9=5 S10=10 S11=40 S25=0 +Z0=2 +Z3=45\r"
  889.         :  S25 DTR timing to 0 seconds
  890.         :  wait -f1              : Wait 1 second and let modem catch up...
  891.  
  892. :  --------------------------------------------------------------------------
  893.  
  894.  
  895. ::                   --- Setup Environment Variables ---
  896.  
  897. online: 
  898.         set disks "abcdefghi"         :set up active disks (you can restrict)
  899.  
  900. ::    Note the prompts below can be anything you wish...
  901.  
  902.         set mprompt "\r\E[1m(F9=Menu) %drive:\L%pwd-> \E[m"   :Help prompt
  903.         : set mprompt "\r\E[1m%drive:\L%pwd->\E[m "    :Normal path prompt
  904.         set hprompt "\r\E[1m%drive:\L%pwd\U [HOST]->\E[m " :HOST mode prompt
  905.         
  906.         : The special command below allows you to put comments on status line...        
  907.         set statliner "[Alt-2=Cmd Line, F2=View, F9=Help] " :maps status line  
  908.  
  909.  
  910. ::                          -- HELPFILE Defined Below --
  911.  
  912. ::      Notice that the Flashup help processor is called with F10 as defined
  913. ::      in key setup or when F1 hit at command line.  The test below 
  914. ::      'if fFILENAME' checks for the existence of the help files for ZCOMM 
  915. ::      or YAM.  If they are found the variable 'helpfile' is set to the 
  916. ::      command that will call help.  The string '@!%' is a clever construct
  917. ::      where each character has a meaning.  The '@' says that what follows 
  918. ::      is a YAM/ZCOMM command.  The '!' means to run a DOS program, and the
  919. ::      '%' says to replace all YAM/ZCOMM variables (word beginning with '%')
  920. ::      before the DOS program is called.  The %home variable contains the
  921. ::      name of the subdirectory where YAM/ZCOMM was first called.  If you use 
  922. ::      the COMM.BAT file I included, this will always be the location
  923. ::      of your communication programs.  First DOS 'echo' if no helpfiles...
  924.  
  925.         set helpfile "@!%echo     No helpfiles located in the home directory: %home"
  926.         
  927.         if fZMANH.HLP set helpfile "@!%yhp %home\zmanh.hlp zmain" :ZCOMM Help 
  928.         if fUMANH.HLP set helpfile "@!%yhp %home\umanh.hlp main"  :YAM Help 
  929.         
  930.         : set helpfile "@yhp \zcomm\zmanh.hlp"      :(older ZCOMM/YAM call)
  931.         
  932.  
  933. ::                          -- Optional setup statements --
  934.  
  935.         set calllog c:/zcomm/calllog :Setup call log (YAM and Registered ZCOMM)
  936.                                      :This file will keep record of calls made  
  937.  
  938.         set fleft  "@mput \b"        : Makes left arrow destructive bksp
  939.         set fright "@mput \40"       : Makes right arrow a right space
  940.         set s8 " \b"    :set string for 'hold' function to space/backspace key
  941.  
  942.         set adlopts rm               : Makes ZModem crash recovery / MobyTurbo
  943.                                      : Note the 'm' will cause an error in pre-
  944.                                      : MobyTurbo versions
  945.         
  946.         set quitcmd \20bye\r\003\336off\r    : maps string given to ALT Q
  947.                                      :to log off automatically after d/l; here
  948.                                      :set to ^P,bye<cr> for CIS then OFF.  Once
  949.                                      :Download starts, just hit Alt-Q to activate
  950.         
  951.         set answerback "\r\n %m \r\n\21"  :Stuff in 'm' name variable...
  952.         
  953.         set tmp c:/zcomm             : Both tmp and lib are shortcut paths
  954.         : set lib c:/arc_stor        : you can use in your script. For example
  955.                                      : if later you may want to change this to
  956.                                      : 'set tmp c:/zcomm/temp' to allow %tmp
  957.                                      : to produce subdirectory location.
  958.                                      
  959.         set dirrx c:/zcomm           :Sets up default for downloaded files as
  960.                                      :above. If you made this 'set dirrx c:\temp
  961.                                      :your download would go to the \temp subdir.
  962.         : set dircx c:/temp          :path to capture file directory
  963.         : set dirfx c:/temp          :path to files (message) directory
  964.         : set dirsx c:/temp          :path to upload dir
  965.         : set oncloserx "@source c:/zcomm/gotafile.t"  
  966.           
  967. :: Above is an example of how you can have a reaction to a file download and 
  968. :: run another file to do special processing.  As you can see you have total
  969. :: control over where things are placed by the package.
  970.         
  971.                                     
  972.  
  973. ::                       -- Define Function Keys --
  974.  
  975. key:    cls         :Notice how a label starts in Col 1 and ends in a ":"
  976.         reskeys     :reset function keys  
  977.                 
  978. ::    Explained below is the function key define command 'set'.  To see all
  979. ::    the keys defined give the command 'key' at the YAM/ZCOMM prompt.  Note 
  980. ::    below that the command format sets a FUNCTION KEY to a specific task.
  981. ::    This is just an example, F3 is defined again after this explanation.
  982.         
  983.  set f3 
  984. @accept s1 "Enter name of Capture File: " ; create -S+ %s1
  985.  
  986.       :  This is just a sample... actual F3 defined below these comments...
  987.       :  Notice that I used a special case of the 'set' command where the
  988.       :  key definition actually appears on the next line starting in col #1.
  989.       :  The reason for this is that normally, function key commands are in
  990.       :  quotes, yet here I wanted a quoted string inside the command.  To
  991.       :  avoid having quotes within quotes, there is a special version of the
  992.       :  set command that accepts the next line starting in column 1, as an
  993.       :  implied command.  This means you don't need quotes around it...  Note
  994.       :  as well the 'set' command DOESN'T start in column 1 because if it did
  995.       :  it would be considered to be a label.
  996.         
  997.       :  To explain how the command works remember anything beginning with 
  998.       :  an "@" sign is a YAM/ZCOMM command (a @! allows you to execute a DOS
  999.       :  program).  Let look at this command defining f3 step by step...
  1000.       :  The command "set" tells the program to set the function key 
  1001.       :  (this case F3) to the following string:
  1002.         
  1003.       :        @accept s1 Enter name of Capture File: ;create -S+ %s1
  1004.         
  1005.       :  You could have used an escape sequence \40 to define a space
  1006.       :  in the string but only necessary in single line format.  This will
  1007.       :  make the prompt --> Enter name of Capture File: <--  Now the "accept"
  1008.       :  command assigns anything you type in response to this prompt and
  1009.       :  stores the response in a variable s1.  Remember ";" is just a way to
  1010.       :  separate multiple commands on each line, so you see when we come to 
  1011.       :  the next command "create", it causes a capture file to be opened
  1012.       :  using the name you have entered.  The modifiers -S+ means, strip
  1013.       :  off control characters (-S) and append to the file (+) if it already
  1014.       :  exists.  Notice the argument %s1 will insert the file name
  1015.       :  added after the prompt (stored in s1).
  1016.         
  1017.       :  You see the PLUS of YAM/ZCOMM is that you can make things look
  1018.       :  any way you want.  You can set 38 function keys (remember that
  1019.       :  F1 moves you from circular buffer to terminal mode to command mode
  1020.       :  and F2 moves you in the opposite direction).  YAM/ZCOMM has THREE 
  1021.       :  displays (command line, terminal mode, and circular buffer) yet this 
  1022.       :  is a FAST way to move between them...
  1023.       
  1024.       :  To see variables you have defined just give the 'set' command followed
  1025.       :  by a return at the YAM/ZCOMM prompt.  If you want to see the value of
  1026.       :  a single key or variable for example 'F5' use the  command 'echo f5'.
  1027.       :  To see what KEYS are defined enter the command 'key' at the YAM/ZCOMM
  1028.       :  command line.  Remember command lines can't exceed 132 characters.
  1029.  
  1030.       :  Now set a series of function keys to activate specific commands...
  1031.  
  1032. ::                   --- NORMAL Function Key Definitions ---
  1033.  
  1034.  set f3 "@gosub capture"        :call capture routine just below 'menu:' label
  1035.  
  1036.  set f4 
  1037. @accept s1 "Send ASCII Msg named: " f -p %s1  : send ASCII text/mesg -paced
  1038.  
  1039.  set f5 
  1040. @accept s1 "Send file using Kermit called: " kermit sb %s1    : send Kermit
  1041.  
  1042.  set f6 
  1043. @accept s1 "Send file using ZModem called: "; echo "\n\tStarted upload at: %t\b\b\b\b\b\b\b\b\b\b\b\b Hours      \n"; sz -rZ %s1
  1044.  : above sends file with ZModem (-r) crash recovery and Run Length Encoding 
  1045.  : (RLE) using '-Z'.  Echo displays the start time of upload...
  1046.   
  1047.  set f7 
  1048. @accept s1 "Receive file using CRCXModem called: " rc %s1   :receive CRCXmodem
  1049.  
  1050.  set f8  
  1051. @accept s1 "Send file CRCXModem called: " sx %s1            :send CRC Xmodem
  1052.  
  1053.  set f9  "@gosub menu"                                      :Call Quick Reference
  1054.  : set f9 "@gosub fkeys"  : Call ANSI function key menu (commented out here...)
  1055.  
  1056.  set f10 "@help"   : Call help processor (newer YAM/ZCOMM just hit F1 x3)
  1057.  
  1058.  
  1059. ::                 --- SHIFTED Function Key Definitions ---
  1060.         
  1061.  set fs3 "@gosub hold"    : puts you in a holding pattern while on-line
  1062.                                                       
  1063.  set fs4 "@echo working...;  gosub tlearn"
  1064.  
  1065.  set fs5                                         : check phone dir entries
  1066. @accept s5 "String to find in phones file: "; find \n%s5 %phones   
  1067.  
  1068.  set fs6  "@gosub reset"   :Resets PROFILE.DAT containing modem dialing info
  1069.  
  1070.  set fs7  "@gosub start.%home/dial.t"   :setup call to dialing menu...
  1071.  
  1072.  set fs9 "@!chkdsk"        :@! example of how to run DOS program 
  1073.                            :In this case CHKDSK used...
  1074.  
  1075. ::                  --- ALT-ed Function Key Definitions ---
  1076.  
  1077.  set fa1 "@kill; call -100 bnf"              : Examples of key assign
  1078.  set fa2 "@kill; call -100 old"              : note "@call -100" will
  1079.  set fa3 "@write; close"                     : call number up to 100
  1080.  set fa4 "@kill; call -100 cis"              : times if busy.
  1081.  set fa5 "@kill; call -100 pcmag"            : kill clears buffer...
  1082.  set fa6 "@kill; bye; gosub host"            : Put into HOST mode
  1083.  set fa7 "\r \r\t\t\t\t %m \r\r"             : When on-line, Alt-F7 signs 
  1084.                                              : your name defined in 'm' setup
  1085.                                              : in PROFILE.DAT
  1086.                                                      
  1087. :: Editors are your choice (they just have to be able to save in ASCII format).
  1088.  
  1089. :: I have included version 3.10 of the Colorado State Editor developed by
  1090. :: J. R. Applegate at the Colorado School of Mines.  This full featured
  1091. :: editor is only 13K and features block copies, moves, upcase, lowcase,
  1092. :: deletes, etc.  It is fully configurable and is PUBLIC DOMAIN! 
  1093.  
  1094. :: The best ASCII editor I have found that can be configured to run any 
  1095. :: command set you want (e.g. WS, WP, Brief, or pull down menus) is a shareware
  1096. :: called QEdit.  It is rated high by many publications (and is my personal 
  1097. :: favorite).  QEdit by SemWare is available on most BBS around the country.  
  1098. :: Worth a look!
  1099.  
  1100. :: Below I again used the special construct @!% (@=command, !=DOS shell, 
  1101. :: %=replace variables before calling DOS command).  If the DOS 'set phones=' 
  1102. :: command was used to setup environment variable at DOS the %phones will 
  1103. :: read it.
  1104.  
  1105.  set fa9                         : Use incase NO editor selected
  1106. @echo " Alt-F9 has no editor defined. Just edit to script under 'set fa9'\n to setup an editor of your choice..."
  1107.  
  1108.  set fa9 "@!%cse %phones"            : example using CSE
  1109.  : set fa9 "@!%q %phones"            : example using QEdit 
  1110.  
  1111. ::  If you want the menu just after loading, remove the ':' in front of the 
  1112. ::  line below to comment it in thereby activating the command.
  1113.  
  1114.     : goto menu
  1115.     
  1116. ::  This is an opening msg for new ZCOMM users and can be commented out if 
  1117. ::  you want to skip it.
  1118.  
  1119.     lput "\r\n\n\t\t -=* Welcome to the World of Telecommunication *=-\r\n\n"
  1120.     lput "\t\t                     PHOMAST.T                    \r\n"
  1121.     lput "\t\t                   [Version 6.3]                 \r\n\n"
  1122.     lput "\t\t      >>> Press F9 if you need more help <<<          \E[10f"
  1123.     lput "\t If you want to change your *setup* defaults just hit SHIFT-F6. \r\n\n"
  1124.     lput "\t To view the current defaults stored in 'PROFILE.DAT' just enter\r\n"
  1125.     lput "\t the command 'type profile.dat'.                                \r\n\n"
  1126.     lput "\t Remember, to utilize your Long Distance Service start the number\r\n"
  1127.     lput "\t with a prefix of '\45l,'.  Notice the sample syntax below...   \r\n\n"
  1128.     lput "\t                       '\45l,512-670-0954'                      \E[23f"
  1129.     
  1130. ::                  Second part of testing for on-line conditions
  1131. ::                                 (Optional)
  1132.  
  1133.      fail       : The 'fail' here eliminates the on-line checking... if
  1134.                 : you want on-line checking, comment this 'fail' out (put a 
  1135.                 : ':' in front of it) and search from the top of the script
  1136.                 : for the line 'if c goto online' and remove the ':' in front
  1137.                 : of it.
  1138.      
  1139.      if !c return             :if no carrier return, else go online
  1140.      echo "\t\t    System still on-line with remote server..."
  1141.      putw "\r" ; t            :hits return and return to terminal mode
  1142.      return                   :Returns system back
  1143.  
  1144. ::---------------------------  End of Setup Code  ----------------------------::
  1145.  
  1146.                         ---------------------------------
  1147. ::--------------------------  AutoConfiguration Code -------------------------::
  1148.                         ---------------------------------
  1149.  
  1150. ::      This code for PROFILE configuration was put at the bottom of the script
  1151. ::      because the script file is searched from the beginning to end.  Since
  1152. ::      configuration is done only at install and when configuration is 
  1153. ::      changed, I put this code at the bottom of the script to allow other 
  1154. ::      procedures to be found faster.
  1155.  
  1156.  
  1157. reset:  : This code segment attached to Shift-F6 will delete the old defaults
  1158.         : stored in PROFILE.DAT and start a new one...  It is completely menu
  1159.         : driven.  Once PROFILE.DAT is deleted it branches to 'setup' label
  1160.         : later in the script to do the actual configuration.
  1161.         
  1162.         display nobell=visual   : Turn bell back ON
  1163.         cd %home                : Attempt to return to original directory
  1164.         cls; echo "\n\n\d7\t\t >>> Communications Configuration Setup <<<\n\n"
  1165.         display bell=visual     : Turn bell back OFF and ask about delete of file
  1166.         lput "          Don't change your setup if you are currently online...\r\n\n"
  1167.         lput "   Insure you are in directory where phones files stored before making\r\n"
  1168.         lput "   any changes... you are currently in a subdirectory called: "; !cd
  1169.         lput "\r\n\nThis directory contains the following PHONES files:\r\n" ; !dir p*.t
  1170.         lput "\n   Is this the correct directory and do you want to change setup (y/N)? "
  1171.  
  1172.         if !y cls echo "\n\n"  fail  
  1173.         del profile.dat             :Delete the old profile data file...
  1174.         
  1175.         :               ---------------------------------
  1176.                         
  1177.         : This code segment is where the PROFILE.DAT file is generated in
  1178.         : response to menu selections...
  1179.         
  1180. make_profile:
  1181.         set s0 ""       :initial variable to NULL        
  1182.         purgek; kill; pv0; create -y profile.dat   :clear buffer/write profile
  1183.                     
  1184.         : Since PROFILE.DAT doesn't exist now, the next code actually writes a
  1185.         : new file (using the echof) called PROFILE.DAT storing your defaults.
  1186.         : What is really happening here is YAM is generating its own script 
  1187.         : file that will contain changed configuration information for future
  1188.         : use.  Remember when you use this technique you must have a space or 
  1189.         : TAB echoed before every command line so it doesn't write the target 
  1190.         : file line in column 1.
  1191.                 
  1192.         echof "::                  >>> DON'T DELETE THIS FILE <<<"
  1193.         echof "::                           PROFILE.DAT\n"
  1194.         echof "::  This file contains important setup information used by YAM/ZCOMM "
  1195.         echof "::  and was completely generated by PHOMAST.T file from menu choices!"
  1196.         echof "::  You can edit this file directly or from YAM/ZCOMM; hit Shift-F6" 
  1197.         echof "::  to call up configuration menus and have the computer do the work.\n"
  1198.         echof "::  You can change Color default here or in the main PHOMAST.T script"
  1199.         echof "::  but remember ANY changes made here will be changed with Shift-F6."
  1200.         echof "::  To see possible colors enter the command 'gosub color' prompt."
  1201.         echof "\n::  Note: If there is NO port command below, default is 'COM1' \n"
  1202.         
  1203.         :: Note that 'lput' is local echo where 'echof' will write to open file
  1204.         :: Remember that 'lput' doesn't put a hard return at the end of lines.
  1205.         :: Below the \E[xxm just add color to the letters 'COLOR'
  1206.         
  1207.         pn15; cls; lput "\E[m\n\n\n\t\t    Are you using a \E[1m\E[33mC\E[32mO\E[34mL\E[35mO\E[36mR\E[m monitor (y/N)? "
  1208.         if !y echof "    pn15 pr127 pu15 ps112 p*112 p@15   :default monochrome..."; goto mono
  1209.  
  1210.         echof "    if dc pn1055 pr26 pu26 ps26 p*26 p@30    :setup default colors"
  1211.         if dc pn1055 pr26 pu26 ps26 p*26 p@30        :setup colors locally
  1212.         
  1213. :: <*>  -------------------- Optional DISPLAY COLORS Setup -------------------
  1214.  
  1215.         ::  If you don't like the default colors just pick one of the color
  1216.         ::  options below and put one copy inside the quotes of the 'echof'
  1217.         ::  above and another copy just below it (e.g. modify the two lines
  1218.         ::  of code above this comment...)
  1219.         ::
  1220.         ::  if dc means -- If Display Color... and the settings are:
  1221.         ::  n=text, r=reverse, u=underline, s=status line, *=message, 
  1222.         ::  @=file indicator (normally blinking i.e. files open) 
  1223.         ::  For example: 2=green, 3=blue, 10=bright green etc...
  1224.         ::  By adding 1024 to any number you will get blinking suppression.
  1225.         ::  To see all the possible colors enter the command 'gosub color'
  1226.         ::  at the YAM/ZCOMM prompt...
  1227.         
  1228.         :: pn15 pr127 pu15 ps112 p*112 p@15       :default monochrome string
  1229.         :: pn7  pr7 pu15 ps7  p*112 p@15        :Alternate monochrome setting
  1230.         
  1231.         :: if dc pn1055 pr31 pu26 ps26 p*26 p@30 :default color string
  1232.         :: if dc pn3  pr10 pu10 ps14 p*10 p@10   :works well with RGB
  1233.         :: if dc pn3  pr30 pu15 ps14 p*12 p@79   :color alternate 1
  1234.         :: if dc pn2  pr10 pu6  ps3  p*3  p@3    :color alternate 2
  1235.         :: if dc pn2  pr30 pu15 ps3  p*3  p@79   :color alternate 3
  1236.         :: if dc pn3  pr30 pu15 ps2  p*12 p@79   :Pearson's choice
  1237.         :: if dc pn31 pr30 pu15 ps14 p*15 p@79   :Willoughby's choice 
  1238.         :: if dc pn1055 pr26 pu26 ps23 p*26 p@28 :My favorite...
  1239.  
  1240. ::      ----------------------------------------------------------------------
  1241.         
  1242.         cls; lput "\n\n\n\t    Is snow a problem with your monitor (e.g. CGA) (y/N)? "
  1243.         if y echof "    display nowarpdrive       :Turn off high speed display"; goto mono
  1244.         display warpdrive   :turn on high speed display locally
  1245.         echof "    display warpdrive         :Turn ON highspeed display (no snow checking)"
  1246.         
  1247.  
  1248. mono:   cls; lput "\r\n\t\t>>> PULSE / TONE Dial Configuration Menu <<<\r\n\n"
  1249.         lput "\t\t   Your current modem dial string is: %mprefix\r\n"
  1250.         lput "\t\t   (If 'M' above Manual dial selected...)\r\n\n"
  1251.         lput "\t\t    1. Set modem to dial TONE type phone.\r\n"
  1252.         lput "\t\t    2. Set modem to dial PULSE type phone.\r\n"
  1253.         lput "\t\t    3. Dial the number using an EXTERNAL phone.\r\n"
  1254.         lput "\t\t    4. Quit -- Don't change a thing...\r\n\n"
  1255.         
  1256.         acceptl1 s9 "\t\t    Choose one of the above: "  :store ans in s9
  1257.         
  1258.         if "Js9,1234" goto ok   :check for correct input... 
  1259.         display nobell=visual
  1260.         lput "\E[24f\7\t\t      You MUST choose between 1 and 4"; sleep 15
  1261.         display bell=visual
  1262.         goback mono
  1263.         
  1264. ok:     if is9,3 echof "    sets mprefix M          :setup for MANUAL dial" ; goto pdone :setup for MANUAL dial
  1265.         if is9,4 echof "    sets mprefix %mprefix"; goto pdone :leave unchanged
  1266.         lput "\r\n Excluding long distance service do you need a special dialing prefix (y/N)? "
  1267.         
  1268.         if !y goto pdone
  1269.         accept s0 "\r\n\t\t    Enter the prefix number now: "
  1270.         if %s0<1 set s0 "" ; goto pdone  :Null was entered for prefix number...
  1271.         sets s0 %s0,           :appends a comma after the dial prefix...              
  1272.         
  1273.         : Remember you must put a tab/space in echo so it produces a legal
  1274.         : line of code in the PROFILE.DAT file, since without a space or
  1275.         : TAB it would just be a label.  Notice the extra spacing after echof.
  1276.         
  1277. pdone:  if is9,1 echof "    sets mprefix ATDT%s0         :setup for TONE dial" ; goto ok
  1278.         if is9,2 echof "    sets mprefix ATDP%s0         :setup for PULSE dial"; goto ok
  1279.            
  1280.         : The next section of code actually looks at the specific hardware
  1281.         : configuration.  This test will work for the 90% of you that have
  1282.         : COM1 or COM2 active attached to a modem that accepts the HAYES
  1283.         : command set.  What happens is the ATtention command is sent to
  1284.         : each port looking for a response.  If one is found (e.g. the modem
  1285.         : answers 'OK') that port is defined as active.  Once hot port is found
  1286.         : a line is added to PROFILE.DAT which activates that port...  This
  1287.         : is particularly interesting since I know of no comm program that does
  1288.         : auto port configuration...
  1289.         
  1290. ok:     write; close        : Before PORT testing turn off file recording
  1291.  
  1292.         lput "\r\n      If external MODEM, make sure it's ON for testing, then HIT ANY KEY. "
  1293.         : Below will wait for keystroke hit, then it echoes 'working'
  1294.         ife y ;  lput "      ...working"   :special construct to wait for any keyhit...
  1295.         display inhibit     : Turn off echo to screen (avoids the AT and OK)
  1296.         
  1297.         sp 1200             : Initially set up speed at 1200 baud for testing
  1298.         pat 9 K\r\n         : Check for OK from modem indicating port match...
  1299.         port 1              : Try COM1 first
  1300.         put "AT\r"; wait -f3              : AT command and wait 3 sec for OK
  1301.         if 9 set s0 1 ; goto pset         : If PORT 1 set s0=1 to indicate COM1
  1302.         port 2              : Try COM2 now that COM1 has failed
  1303.         put "AT\r"; wait -f3              : AT command and wait 3 sec for OK
  1304.         if 9 set s0 2 ; goto pset         : If PORT 2 set s0=2 to indicate COM2     
  1305.         display noinhibit   : Turn local echo back on
  1306.  
  1307.         : If it wasn't PORT 1 or 2 goto ask user what port to use...
  1308.  
  1309.         lput "\r\n\t    Testing hardware I was unable to find an ACTIVE modem..."
  1310.         acceptl1 s0 "\r\n\t    Enter COM port number modem connected to (normally 1): "
  1311.         display nobell=visual
  1312.         if %s0<1 lput "\7\t                    Port 1 assumed...\r\n"; set s0 1  
  1313.         display bell=visual
  1314.         
  1315. pset:   display noinhibit   : Turn local echo back on
  1316.         purgek; kill; pv0; create -+ profile.dat   :restart code recording
  1317.         lput  "\r\n\t\t\t Now configured for COM%s0\r\n\n"
  1318.         echof "    port %s0                    :setup computer COM port number"
  1319.         lput "\t\t\t Hit Any Key to continue..."
  1320.         ife y  ;        :basically a no-op wait for keystroke (nul else nul)
  1321.         
  1322.         cls; set s0 "1"        :default long distance service as '1' service
  1323.         lput "\r\n\n\t Do you want to add a long distance service so you can utilize"
  1324.         lput "\r\n\t the syntax \45l,213-555-1212 to add MCI or SPRINT service to the"
  1325.         lput "\r\n\t to your call [Return will default to '1' prefix] (y/N)? "
  1326.         if y accept s0 "\r\n\t Enter your carrier number (3) COMMAs then account: "
  1327.         if %s0<1 echo "\t\t   >>>  Service \"1\" assumed <<<" ; set s0 "1"  
  1328.         echof "    set l %s0        :setup long distance service variable \45l"
  1329.         
  1330.         :  >>> Notice that setting UPPER CASE variables is only allowed in YAM.
  1331.         :  ZCOMM doesn't allow upper case variables.  This means if a user 
  1332.         :  enters %L, for dialing prefix it there is no way to define it to
  1333.         :  prevent an error...  ZCOMM users can only use %l.
  1334.         
  1335.         : echof "    set L %s0        :setup long distance service variable \45L"
  1336.         
  1337.         lput "\r\n\n\t Enter a name you want defined to Alt-F7 to use as a short cut"
  1338.         accept s9 "\t for signing your name to a message: "
  1339.         if %s9<1 set s9 "<Not defined -  Hit Shift-F6 once off line>" 
  1340.         sets m "\42%s9\42"         :add the quotes to the string...to %m
  1341.         
  1342.         : Note ProYAM users could have used a variable call 'name' here and
  1343.         : retrieved it with %name; but ZCOMM is more restrictive.  It does 
  1344.         : not allow variable names, so I used 'm' here (normally 'm' is the 
  1345.         : second Long Distance Service).  It's much more flexible to use 
  1346.         : 'name' since the %name variable makes more sense -=- Oh' well,
  1347.         : just a minor limitation in the shareware ZCOMM...
  1348.         
  1349.         echof "    set m %m   :name stored in '\45m'"
  1350.         
  1351.         echof "\n::\t\t     -- End of Setup Information --\n"
  1352.         
  1353.         lput "\n\t Storing your new configuration in file named: PROFILE.DAT\r\n"
  1354.         write; close    : Code generation complete, close the PROFILE.DAT file
  1355.         
  1356.         lput "\t  Configuration complete -=- All variables now defined..."
  1357.         lput "\E[20f\t\tHit Any Key to continue and view new PROFILE.DAT"
  1358.         ife y  ;         :basically a no-op wait for keystroke (nul else nul)
  1359.         cls; type profile.dat
  1360.         lput "\t\t\tHit Any Key to continue..."
  1361.         ife y  ;         :basically a no-op wait for keystroke (nul else nul)
  1362.         cls; goto setup  :Force new PROFILE.DAT to be activated.
  1363.  
  1364. ::----------------------- End of Auto Configuration Code --------------------::
  1365.  
  1366. ::                -------------------------------------------                          
  1367. ::           --- For Fancy TOP LINE Menu using ANSI Graphics ---
  1368. ::                -------------------------------------------
  1369.  
  1370. ::  Special thanks to Michael Pearson and Ron Ottinger for ANSI menus concept...
  1371.  
  1372. ::      Notice the ANSI color setup using 'echo' or 'lput' is not simple. Shown
  1373. ::      here the \E[44;36m sets up light blue letters on dark blue background.
  1374. ::      To change to yellow on red for example just search and replace \E[44;36m
  1375. ::      with \E[33;41m  --  Notice in this example I change pn (normal color)
  1376. ::      to pn15 to make bright white.  To change back at end of each sequence
  1377. ::      I moved it back to pn3 (blue).  Be sure to change this to whatever
  1378. ::      normal color you want...  This code is completely OPTIONAL and just for
  1379. ::      fun!
  1380.  
  1381. fkeys                                            ::func keys menu
  1382.         pn15                                     ::make normal color WHITE
  1383.         lput "\E[s"                              ::save cursor position
  1384.         lput "\E[1;1f"                           ::move cursor to menu line
  1385.         lput " 1\E[37;44mExit B\E[0;m 2\E[37;44mEnterB\E[0;m 3\E[37;44mO Capt\E[0;m 4\E[37;44mSascii\E[0;m"   ::the menu
  1386.         lput " 5\E[37;44mSKermt\E[0;m 6\E[37;44mSZmodm\E[0;m 7\E[37;44mRec CX\E[0;m 8\E[37;44mSCxmod\E[0;m"   ::the menu
  1387.         lput " 9\E[37;44mA KEYS\E[0;m 0\E[37;44m>HELP<\E[0;m"
  1388.         lput "\E[u"                              ::restore cursor position
  1389.         set f9 "@gosub altkeys"                  ::f9 calls ctrl f keys next
  1390.         pn3                                      ::change normal color to blue
  1391.     return
  1392.  
  1393. altkeys                                          ::alt-func keys menu
  1394.         pn15                                     ::make normal color WHITE
  1395.         lput "\E[s"                              ::save cursor position
  1396.         lput "\E[1;1f"                           ::move cursor to menu line
  1397.         lput "a1\E[37;44mB&F-24\E[0;ma2\E[37;44mGurd12\E[0;ma3\E[37;44mCloseC\E[0;ma4\E[37;44mCISdem\E[0;m"   ::the menu
  1398.         lput "a5\E[37;44mPC Mag\E[0;ma6\E[37;44m-HOST-\E[0;ma7\E[37;44msignat\E[0;ma8\E[37;44m      \E[0;m"   ::the menu
  1399.         lput "a9\E[37;44mEdPhon\E[0;ma0\E[37;44m      \E[0;m"
  1400.         lput "\E[u"                              :: restore cursor position
  1401.         set f9 "@gosub shiftkeys"                :: f9 calls no keys next
  1402.         pn3                                      ::change normal color to blue
  1403.     return
  1404.  
  1405. shiftkeys                                        ::shift-func keys menu
  1406.         pn15                                     ::make normal color WHITE
  1407.         lput "\E[s"                              ::save cursor position
  1408.         lput "\E[1;1f"                           ::move cursor to menu line
  1409.         lput "s1\E[37;44m      \E[0;ms2\E[37;44m      \E[0;ms3\E[37;44mHoldOL\E[0;ms4\E[37;44mTLearn\E[0;m"   ::the menu
  1410.         lput "s5\E[37;44mSearch\E[0;ms6\E[37;44mConfig\E[0;ms7\E[37;44m      \E[0;ms8\E[37;44m      \E[0;m"   ::the menu
  1411.         lput "s9\E[37;44mC KEYS\E[0;ms0\E[37;44m      \E[0;m"
  1412.         lput "\E[u"                              :: restore cursor position
  1413.         set f9 "@gosub ctrlkeys"                 :: f9 calls alt f keys next
  1414.         pn3                                      ::change normal color to blue
  1415.     return
  1416.  
  1417. ctrlkeys                                         ::ctrl-func keys menu
  1418.         pn15                                     ::make normal color WHITE
  1419.         lput "\E[s"                              ::save cursor position
  1420.         lput "\E[1;1f"                           ::move cursor to menu line
  1421.         lput "c1\E[37;44m     1\E[0;mc2\E[37;44m     2\E[0;mc3\E[37;44m      \E[0;mc4\E[37;44m      \E[0;m"   ::the menu
  1422.         lput "c5\E[37;44m      \E[0;mc6\E[37;44m      \E[0;mc7\E[37;44m      \E[0;mc8\E[37;44m      \E[0;m"   ::the menu
  1423.         lput "c9\E[37;44mOFF   \E[0;mc0\E[37;44m      \E[0;m"
  1424.         lput "\E[u"                              :: restore cursor position
  1425.         set f9 "@gosub nokeys"                   :: f9 calls shift keys next
  1426.         pn3                                      ::change normal color to blue
  1427.     return
  1428.  
  1429.                                   
  1430. nokeys:                                           :: restore status line
  1431.         cls; lput "\E[s"                          :: save cursor position
  1432.         lput "\E[1;1f"                            :: move cursor to menu line
  1433.         lput "                                                                                "
  1434.                                                   :: erase to end of line
  1435.         display nostat                            :: restore status line
  1436.         lput "\E[u"                               :: restore cursor position
  1437.         set f9 "@gosub fkeys"                     :: f9 calls f keys next
  1438.     return
  1439.  
  1440. :: This code demonstrated one way of displaying a HELP MENU using ANSI codes.
  1441. ::
  1442. :: What it does: (by pressing F9)
  1443. ::
  1444. ::    1.  Saves the current cursor position
  1445. ::    2.  Moves cursor to top of screen
  1446. ::    3.  Displays a FUNCTION KEY help menu.
  1447. ::    4.  Puts the cursor back to its original position
  1448. ::    5.  Sets F9 to the next FUNCTION KEY menu in the rotation.
  1449.  
  1450. ::-------------------------- End of ANSI Menu Demo ------------------------::
  1451.  
  1452.  
  1453.     ::  I would like to personally thank Bob Willoughby for the tireless
  1454.     ::  hours he spent proof reading both PHOMAST.T and the supporting
  1455.     ::  document files for this effort.  This release is just over 3000 
  1456.     ::  lines went through multiple revisions as I found better and
  1457.     ::  better ways to make both YAM and ZCOMM easier for the user.  Bob
  1458.     ::  was there the whole way finding spelling errors and pointing out
  1459.     ::  areas that needed more explanation.  I owe him lots for sticking
  1460.     ::  with this effort.    Thank you Bob!
  1461.  
  1462.  
  1463. ::---------------------------------------------------------------------------::
  1464.