home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / zcm_scrp.zip / PHOMAST.T < prev    next >
Text File  |  1989-06-23  |  41KB  |  777 lines

  1.  
  2. :: -Revised  to ZComm Ver 17.29                   ::MRA mods 25 Jan 89
  3. ::                                                ::Release 7.9 Master
  4.  
  5. ::    This starter script was written for your convenience by Michael Ash
  6. ::                      CompuServe Account: 71350,3327
  7. ::                                PHOMAST4.T
  8.  
  9. ::    NOTICE --> for a FAST START please take a minute and follow the 
  10. ::    the instruction below...  This script is completely modular for your
  11. ::    convenience, and includes a simple HOST mode example.
  12.  
  13. ::    Use an ASCII editor (or WordPerfect in DOS Text mode or WordStar in
  14. ::    non-document mode) to check the items below to match your particular
  15. ::    computer setup.  To save you time just SEARCH for sections marked with
  16. ::    the symbol <*>
  17.  
  18. ::        1.  Under SETUP, select port 1 or 2 by uncommenting your choice.
  19. ::                  (Note:  "uncommenting" is explained below.)
  20.  
  21. ::        2.  Under COLORS, select the color string you prefer.
  22.  
  23. ::        3.  Under MODEM SETUP, select the proper modem setup string.
  24.  
  25. ::        4.  Under Environment, select PULSE or TONE dial.
  26.  
  27. ::        5.  See HELPFILE section if you are running older versions of ZCOMM.
  28.  
  29. ::    Be sure to rename THIS file PHODIR.T for use with ZCOMM or PHONES.T
  30. ::    for you YAM users...  For those of you that haven't heard of YAM, it's
  31. ::    the short name for Professional-YAM, a commercial package that includes
  32. ::    all of ZComm (its shareware subset) plus advanced capabilities for
  33. ::    professional telecommunications requirements.
  34.  
  35. ::    Set up a Subdirectory for C:\ZCOMM and path it in AUTOEXEC.BAT file.
  36.  
  37. ::    The following may be added to your autoexec.bat file to give
  38. ::    color to your 'flash-up' help processor... comments here in ()
  39.                 
  40. ::            set PHONES=c:\zcomm\phodir.t   (keeps .t out of root)
  41. ::            set NORMATTR=2                 (sets normal to green) 
  42. ::            set REVATTR=3                  (sets reverse to blue) 
  43. ::            set UNDLATTR=10                (makes underline brt green) 
  44.                 
  45. ::    This script expects to find ZCOMM and PHODIR.T in C:\ZCOMM and a
  46. ::    C:\ZCOMM\TEMP temporary subdirectory...
  47.         
  48. ::    Note a ":" before line makes it a comment... this is the method
  49. ::    to activate OR deactivate lines of code.  To turn something OFF
  50. ::    just put a ":" in front of the line.  Words ending with a ":" that
  51. ::    start in column #1 are labels...
  52.  
  53. ::    To activate menu status or make a call from DOS command line enter:
  54. ::             zcomm gosub menu  <-- or -->  zcomm call apco
  55. ::    either via a batch file or directly as a DOS command...
  56.  
  57. ::    NOTICE that APCO and CIS auto-log demos are set for local San Antonio
  58. ::    numbers... These numbers may differ in your area.  APCO is an example
  59. ::    of an auto-log to a TComm(tm) Bulletin Board System.
  60.  
  61. ::    That should get you going!  Once you are up and running look at the
  62. ::    other commented features that will give you even more POWER...      
  63.  
  64. ::                     ----------------------------
  65.  
  66. ::    I have spent many hours on this beginner script to make ZCOMM or YAM
  67. ::    useful to the novice user right out of the starting block.  If this
  68. ::    has helped you get a better grasp of the package I would like to hear
  69. ::    from you.  If you find it truly useful, and you think my time is worth 
  70. ::    something, please send me a dollar and I'll go out for coffee.  
  71.  
  72. ::    What ever you do, I would appreciate a postcard, just to get an idea
  73. ::    of who this script finally reached...
  74.  
  75. ::                                    Michael Ash
  76. ::                                    3766 Tupelo Ln #2904
  77. ::                                    San Antonio, TX 78229
  78.  
  79. ::                                                     Happy Computing... 
  80.  
  81. ::                     ----------------------------
  82.  
  83. :: <*>        >>>  This SETUP script is where it all begins <<<
  84.  
  85. setup   port 1               :designate COM1 
  86.         : port 2             :designate COM2 (note ':' turns this OFF)
  87.         ena -d               :suppress the Carrier Lost msg during setup
  88.         : ena -D             :establishes a 2sec timing loop for line hits 
  89.                              :(use for call waiting where you can't disable)
  90.         : pa4000             :use for clones running 8 MHz and above...
  91.         pd1                  :turn on time stamping
  92.         pi10                 :set redial for 10 seconds...
  93.         pt4                  :set ascii throttle to 20 char/sec (lower=faster)
  94.         pv-1                 :Verbose OFF (-1 shows none; 50 shows all)
  95.         pz360                :set CST time zone {could use DOS: set ZONE=360}
  96.                             
  97.         display bell=visual        :turns off bell sound
  98.  
  99. ::        The option below allows you to hit an up arrow key to use past 
  100. ::        commands by setting up a history file.  Since all keystrokes are
  101. ::        recorded, (including passwords) you may want to have your calling
  102. ::        batch file delete it or use a RAMDISK when active for security.
  103.  
  104.         history c:\zcomm\histfile  
  105.  
  106.  
  107. :: <*>                 --- Set up DISPLAY COLORS below ---
  108.  
  109.         ::  settings: n=text, r=reverse, u=undline, s=status line,
  110.         ::  *=message, @=file indicator (normally binking i.e. files open) 
  111.         ::  For example: 2=green, 3=blue, 10=bright green etc...
  112.  
  113.         if dc pn7 pr7 pu7 ps7 p*7 p@7         :setup for monochrome monitor
  114.         : if dc pn15 pr15 pu15 ps15 p*15 p@15 :Colors for composite monitors
  115.         : if dc pn3  pr10 pu10 ps14 p*10 p@10 :if RGB, a color monitor string
  116.         : if dc pn31 pr30 pu15 ps14 p*15 p@79  display warpdrive  :gas plasma
  117.  
  118.         :          >>> The line BELOW sets up an EGA/VGA monitor  <<<
  119.         : if dc pn2 pr10 pu6 ps3 p*3 p@3 display warpdrive    :EGA/VGA color
  120.  
  121. ::                             --------------------        
  122.  
  123.         : if c goto online          :if carrier detected skip modem setup
  124.  
  125. ::    Modems using stored profiles will have to initialize and store it
  126. ::    before this will function correctly...(i.e. Hayes 2400)
  127.  
  128. ::    The above line allows you to check the carrier status when YAM/ZCOMM is
  129. ::    loaded.  This means you can take full advantage of the eXit to DOS 
  130. ::    function.  Anytime you are on-line you can get to the command line by
  131. ::    hitting F1 then enter 'X'.  What this does is unload the communication
  132. ::    program but leaves the modem and serial port active.  Now you have full
  133. ::    access to DOS and can return on-line (as long as the host doesn't time
  134. ::    out).  Once through with DOS, re-load YAM/ZCOMM like you did initially
  135. ::    and WAM -- you're back on-line as if you had never left...  To utilize
  136. ::    uncomment this line and one a couple of screen down stating: "if !c..."
  137.  
  138. ::                         --- Check Modem Status ---
  139.  
  140.         echo    "\n\n\n\t\t\t>>> Modem setup in progress <<<\n\n"
  141.         
  142. ::              Below is an example of how to use color and graphics (off now)
  143.  
  144.         : echo "\n\n\n\t\t    ╓──────────────────────────────────────╖"
  145.         : echo "\t\t    ║ \E[44;1;33m   >>> Modem setup in progress <<<  \E[0m ║"
  146.         : echo "\t\t    ╙──────────────────────────────────────╜\n"
  147.         
  148.         sp 1200                           : Initially set up speed at 1200 baud
  149.         pat 9 K\r\n                       : Check for OK from modem
  150. rc:     put "ATZ\r"; wait -f3             : ATZ then wait up to 3 sec for OK
  151.         if 9 goto modset                  : If Modem on (OK) skip error msg
  152.         echo "\n\t\t  Please turn your modem ON, or check port setup..."
  153.         sleep 20                          : You get 2 seconds to turn it on!
  154.         cls; goback rc                    : Check modem again...
  155.  
  156. :: <*>     --- Some of the common MODEM SETUP commands definitions ---
  157.  
  158. ::  &C1=Data Carrier Detect  &D2=hang up with change in DTR  &J=jack type
  159. ::  E1=modem echos commands back to terminal  V1=Word result codes
  160. ::  &S1=run RS232C spec  &W=Save config to nonvolatile memory  L=speaker low
  161.  
  162. ::  X4=Detect dial tones and busy signals; enable extended result codes.
  163. ::     With this activated (default for most modems) status messages are
  164. ::     sent to the screen about modem activity.  English words instead of 
  165. ::     number codes are displayed on the screen. 
  166.  
  167. ::  S0=answer rings  S6=dial tone wait  S7= wait for connect  S8=pause for ","
  168. ::  S9=Carrier det response  S10=delay carrier lost and hangup  S11=dial speed
  169.  
  170. ::  Remember if your modem doesn't hang up correctly try &D2 in the string.
  171.  
  172. modset:
  173.         putw "AT E1 V1 X1 S0=0 S7=60 S8=2 S11=50 \r" :Normal 1200 baud setup
  174.         
  175.         :       -- Line below is an alternate 1200 baud setup command --
  176.         :  putw "AT E1 Q0 S0=0 S6=3 S7=40 S8=2 S10=10 S11=50 V1\r" ; wait -f2
  177.         
  178.         :  putw "AT E1 L X4 V1 &C1 &D2 &J &S1 \r"    :Hayes/Zenith 2400 baud
  179.         :  putw "AT S0=0 S6=3 S7=60 S10=10 S11=50\r" :second line
  180.         
  181.         :  putw "ATZ0\r"    : Recalls Hayes Profile 0 if already defined
  182.  
  183.         :  put "AT E0 V1 X4 &D2 \r"           :for everex 2400 baud
  184.  
  185. ::               -- ZOOM 2400 baud internal modem setup below --
  186.  
  187.         :  handshake both        : Handshakes both CTS or XOff
  188.         :  putw "AT &C &D2 &L0 C1 X5 S9=5 S10=10 S11=40 S25=0 +Z0=2 +Z3=45\r"
  189.         :  S25 DTR timing to 0 seconds
  190.         :  wait -f1              : Wait 1 second and let modem catch up...
  191.  
  192.  
  193.  
  194. :: <*>             --- Setup Environment Variables ---
  195.  
  196. online:
  197.         : set mprefix ATDP      : Pulse Dial (commented out here)
  198.         set mprefix ATDT        : Tone Dial
  199.         : set mprefix ATDT1170, : Tone Dial plus call wait defeat (Texas)
  200.  
  201.         set l "1"; set m "1"    
  202. ::    Above Sets long distance carriers.  You have two choices 'l' & 'm' 
  203. ::    (i.e. MCI, Sprint).  Starting a phone# with %m will call that number
  204. ::    using the pre-defined phone account...
  205.  
  206.         set answerback "\r\nYour NAME and CITY\r\n\21"
  207.         set disks "abcdef"         :set up active disks
  208.  
  209. ::    Note the prompts below can be anything you wish...
  210.  
  211.         set mprompt "\r\E[1m(F9=Menu) %drive:\L%pwd-> \E[m"   :Help prompt
  212.         : set mprompt "\r\E[1m%drive:\L%pwd->\E[m "    :Normal path prompt
  213.         set hprompt "\r\E[1m%drive:\L%pwd\U [HOST]->\E[m " :HOST mode prompt
  214.  
  215.         set fleft  "@mput \b"        : Makes left arrow destructive bksp
  216.         set fright "@mput \40"       : Makes right arrow a right space
  217.  
  218.         set adlopts r                : Makes Auto ZModem use crash recovery 
  219.         set quitcmd \003\336off\r    : ALT Q logs off automatically after d/l
  220.         
  221.         set dirrx c:/zcomm/temp      : Sets up default for downloaded files
  222.         
  223.         set tmp c:/zcomm/temp        : Both tmp and lib are shortcut paths
  224.         : set lib c:/arc_stor        : you can use in your script. For example
  225.                                      : if later you add the line 'cd %tmp' it
  226.                                      : will put you in the c:\zcomm\temp 
  227.                                      : subdirectory...
  228.                                      
  229.  
  230. :: <*>                  -- HELPFILE Defined Below --
  231.  
  232.         set helpfile "@!yhp \zcomm\zmanh.hlp zmain" :Call Help Processor 17.29+
  233.         : set helpfile "@yhp \zcomm\zmanh.hlp"      :(older ZCOMM/YAM call)
  234.         
  235. ::                     -- Optional setup statements --
  236.  
  237.         : set calllog c:/YAM/calllog     : Setup call log (YAM only)
  238.  
  239.  
  240. ::                       -- Define Function Keys --
  241.  
  242. key:    cls         :Notice how a label starts in Col 1 and ends in a ":"
  243.         reskeys     :reset function keys  
  244.                 
  245. ::    Explained below is the function key define command 'set'.  Note below
  246. ::    the command format sets a FUNCTION KEY to a specific task:
  247.         
  248.  set f3 
  249. @accept s1 "Enter name of \Capture File: " ; create -s+ %s1 ; t
  250.  
  251.       :  Notice that I used a special case of the 'set' command where the
  252.       :  key definition actually appears on the next line starting in col #1.
  253.       :  The reason for this is normally function key commands are in
  254.       :  quotes, yet here I wanted a quoted string inside the command.  To
  255.       :  avoid having quotes within quotes, there is a special version of the
  256.       :  set command that accepts the next line starting in column 1, as an
  257.       :  implied command.  This means you don't need quotes around it...
  258.         
  259.       :  To explain how the command works remember anything beginning with 
  260.       :  an "@" sign is a YAM/ZCOMM command (a @! allows you to execute a DOS
  261.       :  program).  Let look at this command defining f3 step by step...
  262.       :  The command "set" tells the program to set the function key 
  263.       :  (this case F3) to the following string:
  264.         
  265.       :        @accept s1 Enter name of Capture File: ;create -s+ %s1 ; t  
  266.         
  267.       :  You could have used an escape sequence \40 to define a space
  268.       :  in the string but only necessary in single line format.  This will
  269.       :  make the prompt --> Enter name of Capture File: <--  Now the "accept"
  270.       :  command assigns anything you type in response to this prompt and
  271.       :  stores in a variable s1.  Remember ";" is just a way to
  272.       :  separate multiple commands on each line, so you see when we come to 
  273.       :  next command "create", it causes a capture file to be opened
  274.       :  using the name you have entered.  The modifiers -s+ means, strip
  275.       :  off control characters (-s) and append to the file (+) if it already
  276.       :  exists.  Notice the argument %s1 will insert the file name
  277.       :  added after the prompt (stored in s1), and  ;t just puts YAM/
  278.       :  ZCOMM back into terminal mode (ie connected to the other computer)
  279.       :  instead of leaving you in command mode.  
  280.         
  281.       :  You see the PLUS of YAM/ZCOMM is that you can make things look
  282.       :  anyway you want.  You can set 38 function keys ( remember that
  283.       :  F1 moves you from circular buffer to terminal mode to command mode
  284.       :  and F2 moves you in the opposite direction).  YAM/ZCOMM has THREE 
  285.       :  displays and this is a FAST way to move between them...
  286.  
  287.       :  Now set a series of function keys to activate specific commands...
  288.  
  289.  
  290. ::                   --- NORMAL Function Key Definitions ---
  291.         
  292.  set f4 
  293. @accept s1 "Send ASCII Msg named: " f -p %s1    : send ASCII text or upload
  294.                                                 : a message...
  295.  set f5 
  296. @accept s1 "Send file using Kermit called: " kermit sb %s1    : send Kermit
  297.  
  298.  set f6 
  299. @accept s1 "Send file using ZModem called: " sz -Z %s1  
  300.     : above sends file with ZModem Run Length Encoding (RLE) using '-Z'
  301.  
  302.  set f7 
  303. @accept s1 "Receive file using CRCXModem called: " rc %s1   :receive CRCXmodem
  304.  
  305.  set f8  
  306. @accept s1 "Send file CRCXModem called: " sx %s1            :send CRC Xmodem
  307.  
  308.  set f9  "@gosub menu"                            :Call Quick Reference
  309.  set f10 "@help"                                  :Call help processor
  310.  
  311. ::                 --- SHIFTED Function Key Definitions ---
  312.         
  313.  set fs3 "@gosub color"
  314.  set fs4 "@echo working...;  gosub tlearn"
  315.  set fs5                                         : check phone dir entries
  316. @accept s5 "Search for title name: "; find \n%s5 %phones   
  317.  
  318.  set fs6  
  319. @echo "\t\t\t Shift F6 not defined -- Hit F9"
  320.  
  321.  set fs9 "@!q"    : @! allows call to DOS programs, in this case QEdit
  322.  
  323. ::                  --- ALT-ed Function Key Definitions ---
  324.  
  325.  set fa1 "@call -100 apco3"                  : Examples of key assign
  326.  set fa2 "@call -100 ap"                     : note "@call -100" will
  327.  set fa3 "@write; close"                     : call number up to 100
  328.  set fa4 "@kill; call -100 CIS12"            : times if busy.
  329.  set fa5 "@kill; call -100 pcmag"            : kill clears buffer...
  330.  set fa6 "@kill; bye; gosub host"            : Call for HOST mode
  331.  set fa7 "\t\t\t <your name here>\r"         : When on-line, Alt-7 signs 
  332.                                              : your name in a message...
  333.  set fa9 "@!q c:\zcomm\phodir.t"             : Calls QEdit, loads phodir.t
  334.  
  335.     
  336. ::  This is an opening msg for new ZComm users and can be commented
  337. ::  out if you wish to skip the opening message.
  338.  
  339.  
  340.      echo "\n\n\t\t     -=* Press F9 for Quick Reference *=- \n\n\n\n\n\n\n\n"
  341.  
  342. ::                  Second part of testing for on-line conditions
  343. ::                                 (Optional)
  344.  
  345.      : if !c return             :if no carrier return, else go online
  346.      : echo "\t\t    System still on-line with remote server..."
  347.      : putw "\r" ; t            :hit return and return to terminal mode              
  348.  
  349.      
  350.      return                     : Returns system back to terminal mode
  351.  
  352.  
  353. :===========================================================================:
  354.  
  355. menu                      :On screen Menu Generation...
  356.  
  357.   cls; echo "                   >>>  ZComm Function Key Menu <<<                             "
  358.   echo "                                                                                "
  359.   echo "Alt-N  EMERGENCY EXIT, 'Nuke It' to get out of trouble/escape a command         "
  360.   echo "                                                                                "
  361.   echo "F1  Exit Circular Buffer            F2  Enter Circular Buffer                   "
  362.   echo "F3  OPEN Capture file               F4  Send ASCII Text                         "
  363.   echo "F5  Send Kermit Upload              F6  Send Zmodem Upload    <<BEST>>          "
  364.   echo "F7  Receive CrcXmodem Download      F8  Send CrcXmodem Upload                   " 
  365.   echo "F9  Press for THIS HELP SCREEN      F10  Flashup Help Processor                 "
  366.   echo "Alt-1  Get DOS Command prompt       Alt-2  Get ZCOMM Command prompt             "
  367.   echo "                                                                                "
  368.   echo "sF3  Show some ZComm color choices  sF4  Use Turbolearn Script Writer           "
  369.   echo "sF5  Search for dialing entry       sF6  <not defined>                          "
  370.   echo "                                                                                "
  371.   echo "aF1  AutoLog APCO (300 baud)        aF2  AutoLog APCO (1200 baud)               "
  372.   echo "aF3  CLOSE Capture file             aF4  CIS DEMO at 1200 baud                  "
  373.   echo "aF5  Call PC Magazine's BBS         aF6  Enter HOST MODE operation              "
  374.   echo "aF7  Sign name on-line              ALT-F9  Edit PHODIR.T SCRIPT                "
  375.   echo "                                                                                "
  376.   echo "     TO CALL OTHER BBSs: enter 'call name' where name is a label                "
  377.   echo "                                                                                "
  378.   echo "Stop Redialing ---- press <CR>      Hangup w/o pgm exit  - enter 'bye'          "
  379.   echo "PgUp into Buffer; <CR> to return    -> EXIT hit F1 then -- enter 'off'          "
  380.   return 
  381.  
  382. ::                     --- Color Generation examples ---
  383.  
  384. color
  385.      cls; echo "\n\t\t\t   \E[32m\E[41m >>> ANSI Color Calls <<< \n\n"
  386.      echo "Foreground:\n"
  387.      lput "\E[47m\E[30m\\E[30m\E[40m  \E[31m\\E[31m  \E[32m\\E[32m  \E[33m"
  388.      lput "\\E[33m  \E[34m\\E[34m  \E[35m\\E[35m  \E[36m\\E[36m  \E[37m\\E[37m"
  389.  
  390.      echo "\n\nBackground:\n"
  391.      lput "\E[40m\\E[40m \E[30m\E[41m \\E[41m \E[42m \\E[42m \E[43m \\E[43m "
  392.      lput "\E[44m \\E[44m \E[45m \\E[45m \E[46m \\E[46m \E[47m \\E[47m \n\n"
  393.  
  394.      echo "Modifiers (primary green):\n \E[32m"  :Switch foreground back to green
  395.      lput "\E[0mReset, Bold, Faint, Italics, Underline,    Blinking,"
  396.      lput "    Reverse, Invisible\n\r"
  397.  
  398.      lput "\E[0m\\E[0  \E[1m\\E[1m   \E[2m\\E[2m  \E[3m\\E[3m\E[0m     \E[4m\\"
  399.      lput "E[4m\E[0m    \E[5m\\E[5m or \\E[6m \E[0m  \E[7m\\E[7m\E[0m     \\E[8m"
  400.  
  401.      echo "\E[36m\E[21f\t\t   Notice \\E[21f puts cursor on 21rd line...\E[23f"
  402.      return
  403.  
  404.  
  405. :===========================================================================:
  406. :                      --- Auto Logon Section ---                           :
  407.  
  408. apco12    cls; echo "\n\t\t ZCOMM is now calling APCO at 1200 Baud\n\n"
  409.           ena -E -Z -8g                 :enaBLE Error ck, auto d/l, w graphics
  410.           nolog; speed 1200             :turn off log and set speed 1200 baud
  411.           goto number                   :Skip 300 baud dial
  412.  
  413. apco3     cls; echo "\n\t\t ZCOMM is now calling APCO at 300 Baud\n\n"
  414.           ena -E -Z -8g                 :enaBLE Error ck, auto ZModem w graphics
  415.           nolog; speed 300              :turn off log and set speed 300 baud
  416.  
  417. number:   bye                           :hang up modem
  418.           654-7756                      :Local dial
  419.           : 1-654-7756                  :Toll call (commented out)
  420.           : 1-512-654-7756              :Long distance  (outside San Antonio)
  421.           
  422.           cls
  423.           : echo "\E[34m\n\n\t\t >>> Welcome to the APCO BBS -- Please standby <<<"
  424.           : display inhibit             :turns off display for opening setup...
  425.                                         :(use this to not show opening screens)
  426.           ena -E -Z -8g                 :enaBLE Error ck, auto ZModem w graphics
  427.           pat; pat 1i "ENTER"           :Clear patterns and look for ENTER
  428.           wait                          :Wait for pattern
  429.           : put "\rn\ry\r\r"              :REQUEST graphics and color
  430.           put "\r\r\r"                  :SKIP graphics and color
  431.           restime                       :Reset status clock  (Yam Only)
  432.           pat 1i "right (y/N/why)?"
  433.           wait                          :wait for tcomm...
  434.           : display noinhibit             :turn display back on if off
  435.           pat 1i "ast name: "           :Look for log in prompt
  436.           wait                          :Wait until prompt occurs
  437.                     
  438. :: <*>    Note you will have to log-on manually first to get a password on
  439. ::        APCO...  Since you don't have a password assigned, the line below
  440. ::        skips the rest of the auto log-on and hooks you to the APCO HOST.
  441. ::        When you have a name and password, add them in the 'putw' statement
  442. ::        BELOW and DELETE (or comment out) this NEXT line...
  443.  
  444.           t; return       : Abort auto-login until name assigned below.
  445. ::        ^^^^^^^^^:delete this after name/password loaded below!
  446.  
  447.           putw "FIRST LAST NAME\rPASSWORD\r"     :Enter name / password
  448.  
  449.           pat 2i "=="              :Look for 'Announc' string of bulletins
  450.           wait
  451.           put \013                 :Ctrl K to skip Bulletins
  452.           put "q\rm\r"             :Drop on menu level to prevent timeout
  453.           
  454. ::                            >>> Alarm Section <<< 
  455.  
  456.           display nobell=visual           :Turn bell back ON 
  457.           lput "\r\n\n\t\t  Hit *BACKSPACE* key to \E[3m\E[5mSTOP\E[0m alarm..." 
  458.           sleep 30                        :3 sec for response before alarm
  459.           while "!k&&L<20" lput "\7\7"    :For 20x and While nokey, make noise 
  460.           if k goto bv                    :If keyhit then skip next call 
  461.           
  462. ::        Put other DOS noise making program here if you wish, for example
  463. ::        !sound  (note the '!' will execute DOS programs from inside script)
  464.  
  465. bv:       cls; display bell=visual        :space and quiet bell 
  466.           put "r\r"                          :Prepare to read mail... 
  467.           pf30                               :Reset search wait (3 sec)
  468.           kill                               :Clear circular buffer
  469.           restime                            :Reset the timer (yam only)
  470.           :  create -s+ %tmp\apco%d.log      :sTRIP Ctrl, append date file
  471.           cd %tmp                            :Change directory to d/l area 
  472.           t                                  :activate terminal mode 
  473.           return
  474.  
  475.  
  476. :---------------------------------------------------------------------------:
  477. :                --- Second example of an auto logon script ---             :
  478.  
  479. CIS12     cls; bye      :Note -- CIS in caps so won't be called by mistake
  480.           echo "\t\t\tNow accessing CompuServe at 1200 baud...\n\n " 
  481.           speed 1201 435-3883     :Odd number, 2 stop bits, error trap 
  482.           goto cislog                 :Goto logon section of CIS script 
  483.  
  484. cis       cls; bye; echo "\t\t\tNow accessing CompuServe at 300 baud...\n\n "
  485.           speed 300 435-3883   
  486. cislog:   sleep 20                            :Sleep for 2 seconds
  487.    
  488.           ena -E -7e   : put into Error correcting 7 bit, even parity...
  489.           echo ""; echo "Sending ^C"; put \3  :Send Ctrl-C, echo doing it. 
  490.           pattern 1i ID:                      :Wait for ID    
  491.           wait                                :"i" causes immediate release 
  492.           putw "77770,101\r"                  :Enter Account (can be yours)
  493.           pat 1i word:                        :Wait for password prompt
  494.           wait
  495.           putw "FREE-DEMO\r"                  :Enter password for demo...
  496.           kill                                :Kill initial login text 
  497.           restime                             :Reset status timer (yam only)
  498.           : create -s+ %tmp\cis.log             :sTRIP hi-bit, append data file
  499.           : cd %tmp                             :Change directory to d/l area 
  500.  
  501.           :Set: fULL duplex, B proto, strip ctrl char, don't pAUSE for (CR) 
  502.           ena -fcs!p  
  503.           t                                  :activate terminal mode 
  504.           return
  505.  
  506. :                     --- End of Auto Log Examples ---                        :
  507. :               --------------------------------------------                  :
  508.  
  509. :=============================================================================:
  510. :                                                                             :      
  511.                         
  512.                              
  513. ::  Note:  This is a "hands-on" script.  It only incorporates two "auto       :
  514. ::         logon" examples which show how to write an auto logon script.      :
  515. ::         One example runs an auto logon to the Alamo PC Organization BBS,   :
  516. ::         and the other gets you into the demo area of CompuServe...         :
  517. ::                                                                            :
  518. ::         The APCO BBS is currently operating under the TComm remote         :
  519. ::         access system software, so the auto logon script has to "see"      :
  520. ::         questions asked by that system and answer them.  Other BBS         :
  521. ::         systems present a different "face" when you log on, so auto        :
  522. ::         logon scripts for other systems will differ somewhat.              :
  523. ::                                                                            :
  524. ::         The normal single line phone directory entries in the directory    :
  525. ::         below were created with an ASCII text editor.  Executing those     :
  526. ::         entries will place ZComm into terminal mode w/graphics enabled     :
  527. ::         as soon as a connect is made.  This works well for making calls    :
  528. ::         and gives you full control of the logon process following a        :
  529. ::         connect.  However, if you want to develop automatic logon          :
  530. ::         scripts, you will need to comment out or delete the entries        :
  531. ::         following the ';' in the directory examples below (e.g. place      :
  532. ::         a colon and a space in between the ';' and 't -8g'), and then      :
  533. ::         make 't -8g' the final entry in the auto logon routine.            :
  534. ::                                                                            :
  535. ::         The reason for this is that placing ZComm into terminal mode by    :
  536. ::         entering 't' stops script pattern searches.  Examples of auto      :
  537. ::         logon scripts may be found in Chuck Forsberg's phone scripts       :
  538. ::         that are distributed with ZComm, and the ZComm manual explains     :
  539. ::         how such auto logon scripts are constructed and how to use the     :
  540. ::         TurboLearn(tm) feature to automate writing scripts.  I recommend   :
  541. ::         that new ZComm users use this script essentially "as is" for       :
  542. ::         a while to test your new phone directory entries and become        :
  543. ::         familiar (comfortable) with ZComm.  Then you can enjoy the         :
  544. ::         challenge, the fun, and the satisfaction of modifying this script  :
  545. ::         to add auto logon procedures, dial queues, and the like.  Keep in  :
  546. ::         mind that this is only a simple example script to use in learning  :
  547. ::         basic ZComm functions.  You will have plenty of time to enhance    :
  548. ::         and embellish this script later.                                   :
  549. ::                                                                            :
  550. ::                  <<< comments courtesy of Bob Willoughby >>>               :
  551. ::                                                                            :
  552. ::                 >>> Actual Dialing Scripts Are Found Below <<<             :
  553. ::         Remember... those items starting with ":"  are commented out       :
  554. ::                                                                            :
  555. :=============================================================================:
  556.  
  557.  
  558. :                 --- Simple Phone Directory Entries ---                    
  559.  
  560. apco24     bye; speed 2400  654-7817 ena -E;t -8g    :membership board #
  561. apco12     bye; speed 1200  654-7817 ena -E;t -8g
  562. public     bye; speed 1200  654-7756 ena -E;t -8g    :APCO public BBS
  563.  
  564. ::               --- Some San Antonio Bulletin Boards ---                          
  565.  
  566. abbey_road       bye; sp 1200   590-6036 ena -E;t -8g
  567. current          bye; sp 1200   828-7883 ena -E;t -8g    
  568. cutting_edge     bye; sp 1200   641-6813 ena -E;t -8g    
  569. sahug            bye; sp 1200   341-0586 ena -E;t -8g    :Zenith Group
  570. satug            bye; sp 1200   496-1054 ena -E;t -8g
  571. teachers_lounge  bye; sp 1200   344-7470 ena -E;t -8g
  572.  
  573. ::  Note to users -- Some of the above San Antonio bulletin boards operate
  574. ::  at speeds higher than 1200 baud.  If you have a 2400 baud modem, just
  575. ::  edit the 'speed 1200' to read 'speed 2400' as appropriate in the above
  576. ::  directory.  Want to add other favorites?  Just add them in with an ASCII
  577. ::  text editor using the above as example entries.  It's easy!  
  578.  
  579. ::                  --- Some Classic BBS systems ---
  580.  
  581. buerg24    bye; sp 2400   1-707-778-8944 ena -E;t -8g    :Vern Buerg's BBS
  582. buerg12    bye; sp 1200   1-707-778-8944 ena -E;t -8g
  583.  
  584. jordan24   bye; sp 2400   1-301-428-7931 ena -E;t -8g    :Larry Jordan
  585. jordan12   bye; sp 1200   1-301-428-7931 ena -E;t -8g
  586.  
  587. genie12    bye; sp 1200  226-6513 ena -hs;t              :GE Network
  588. genie24    bye; sp 2400  271-0538 ena -hs;t
  589.  
  590. pcmag      bye; sp 1200   1-212-696-0360 ena -E;t -8g    :PC Magazine BBS
  591. pctech     bye; sp 1200   1-301-576-7285 t               :PC Tech Journal
  592.  
  593.  
  594. ::               -=- End of simple phone directory entries -=-
  595.  
  596. :=============================================================================:
  597.  
  598. ::         Generate a script with TurboLearn Script Writer(TM)  
  599. ::                    Hit Shift-F4 to start this...
  600.  
  601. tlearn    set fc10 "" :: telephone number, and flag that telno was entered
  602.      if c goto connected
  603.      cls
  604.      accept fc10 "Enter Telephone Number "
  605. ag1: accept fa1 "Enter Speed (300, 1200, 2400) "
  606.      if ifa1,2400 speed 2400 goto ag2
  607.      if ifa1,1200 speed 1200 goto ag2
  608.      if ifa1,300 speed 300 goto ag2
  609.      echo "Bad speed"; goback ag1
  610. ag2: lput "\r\n1   System uses IBM PC (ANSI) line drawing characters\r\n"
  611.      lput "2   System uses 7 bits even parity\r\n"
  612.      lput "3   System uses 8 bits No parity (8n1)\r\n"
  613.      lput "\r\n"
  614.      acceptl1 fa2 "Choose one of the above: "
  615.      lput "\r\n"
  616.      ena -8n
  617.      @%fc10
  618.      if !c echo "Sorry, no connection"; return
  619.      set fa5 ""
  620.      if ifa2,1 ena -8g; set fa5 "ena -8g"
  621.      if ifa2,2 ena -7e; set fa5 "ena -7e"
  622. connected:
  623.      echo "Finish with F1.  Use ALT-B to send a break if necessary"
  624.      learn -y tlrn.tmp
  625. cn2: if !r echo "WARNING: Learning (recording) terminated prematurely!"
  626.      close
  627.      kill
  628.      create newscr.t
  629.      if !r abort
  630.      echo "Is this to become a Telephone Directory entry (y/n)?"
  631.      if !y goto nodir
  632.      accept fa6 "What directory entry name to use? "
  633.      echoc "%fa6    speed %fa1 %fc10 %fa5"
  634. nodir:    close;  set fa2 ""
  635.      echo "Should the script disconnect the phone line (y/n) ?"
  636.      if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
  637.      set fa2 "bye;  return"
  638.      echo "Should the script then exit to the Operating System (y/n)?"
  639.      if y  set fa2 "off"
  640.      !tlearn -r tlrn.tmp >>newscr.t
  641.      create -+ newscr.t; echof "   %fa2";  close
  642. scdone:   echo "Your new script is in the file 'newscr.t' !!"
  643.      if %fc10 echo "You may add this file to your Telephone Directory"
  644.      if %fc10 echo "Or execute it with 'call %fa6.newscr.t'";  return
  645.      echo "You may execute this file with 'source newscr.t'"
  646.      return
  647.  
  648.  
  649.        
  650. :=============================================================================:
  651.  
  652. ::                    ---  Using YAM/ZComm in HOST MODE  ---
  653.  
  654. ::      Note that for maximum -security- have this section be another file
  655. ::      so users won't see your passwords.
  656.  
  657.  
  658. ::           YAM users can comment in 'demand %password' at end of file
  659.  
  660. host    cls; echo " Activating host mode operation...  Stand by!\n\n"
  661.         sp 2400
  662.         : sp 1200                     : use for 1200 baud host modem...
  663.         
  664.         : set home "/HOST"          : Optional restricted directory 
  665.         
  666. ::    The above command can force users into a specific area on disk.  It 
  667. ::    CRITICAL you use "/" NOT a "\" in this command.  This will lock users
  668. ::    into that directory and its subdirectories.  If you use this 
  669. ::    command, you MUST have your welcome and xhelpfile as a different
  670. ::    file and this file MUST be in the directory specified by the 'set
  671. ::    home' command.  To function it MUST be a READ ONLY file.  You may
  672. ::    use HOSTHELP.TXT for this purpose but it will need to rename to
  673. ::    HOSTHELP.T.  Remember you will also need to add some starting 
  674. ::    labels and utilize new 'set welcome' and 'set xhelpfile' commands.
  675.  
  676.         set welcome "@gosub welcome./zcomm/phodir.t"  : setup Welcome
  677.         
  678.         set messages "/zcomm/messages"     : setup file for messages
  679.         
  680. ::    Private should set to another directory so people won't see 
  681. ::    private messages.
  682.         set private "/zcomm/pmessage"      : Setup private message area
  683.         
  684.         
  685. ::    Normally section below would be in another file so people could NOT
  686. ::    view your passwords.  For testing you can get around this by assigning
  687. ::    your script a READ-ONLY, HIDDEN attributes.  For YAM users wanting to
  688. ::    use the 'demand %password' option, the file CAN NOT have a HIDDEN 
  689. ::    attribute so you MUST put this in another directory that users can't
  690. ::    access for protection.
  691.  
  692.         set password "xxxxxxxx"   : CHANGE THIS Access Password 
  693.         set unrestrict "xxxxxx"   : WARNING - CHANGE THIS DOS drop PASSWORD!!
  694.  
  695. :: <*>                 -- HOST Helpfile Defined Below --
  696.  
  697.         set xhelpfile "@gosub help./zcomm/phodir.t"  : Custom help 17.29+
  698.         : set xhelpfile "@type hosthelp.txt>com1"    : (older versions)
  699.                                            :^^^^ set this for com1 or com2
  700.                                            : Notice this is an EXTERNAL file!
  701.                                            
  702.         set disks "abcdef"                    : Setup restricted disk area
  703.  
  704.         set call1 "ATZ\r\336\336ATZ\r\336\336"  :prepare to answer phone...
  705.         set call2 "ATZ\r\336\336ATM1X1S0=1\r\336ATM1X1S0=1\r\336\336"
  706.  
  707.         :       Note 'call3' below would normally be a command that
  708.         :       requires quotes around it, but it includes a quoted string
  709.         :       so you MUST use this alternate form of the set command to
  710.         :       have the actual command start at COL #1 of the next line.
  711.         :                 <<< This works with YAM only...>>>
  712.  
  713.         : set call3
  714. : @echo "\t\t Now awaiting incoming calls... Press F1 to exit.\n\n"
  715.  
  716.         set answerback "\r\nYOUR NAME HERE...\r\n\21"
  717.  
  718.         set outahost "@pk512; putw ATE1V1X1S7=60S8=1S11=50S0=0\r;pwd; gosub menu"        
  719.                  
  720.         set baudstr "@gosub baud"               : sub below to find speed
  721.         pc60                                    : callout interval = 60 sec
  722.         host
  723.   
  724.         :               >>> Check for Caller Speed <<<
  725.         
  726. baud    pat 1 "CONNECT\r\n"; pat 2 "NO CARRIER"
  727.         pat 3 "CONNECT 1200\r\n"; pat 4 "CONNECT 2400\r\n"
  728.         pe-20
  729.         wait -Ef25
  730.         dis -E
  731.         if 1 speed 300 return
  732.         if 3 speed 1200 sleep 20 return
  733.         if 4 speed 2400 sleep 20 return
  734.         kill create -+ rings
  735.         close
  736.         fail
  737.   
  738. welcome:
  739.             :In HOST mode, below is what the user will see on login 
  740.  
  741.     echo "                     >>> Welcome to YAM/ZCOMM Host Mode <<<                     "
  742.     
  743.     : demand %password    :YAM users may comment this in to request password
  744.  
  745. ::    The 'demand' command is only available in YAM and NOT in ZComm...
  746. ::    If you are using ZComm there is no way to restrict initial access
  747. ::    like you can with YAM.  ZComm CAN will RESTRICT access to DOS if
  748. ::    user doesn't know the password ...
  749.  
  750. help:       :Note this is also the help message...
  751.     echo "                                                                                "
  752.     echo "        The thing to remember is that when you see the prompt followed          "
  753.     echo "        by [HOST] it is like you are actually sitting at the host               "
  754.     echo "        terminal...  To execute commands on your own YAM/ZComm hit F1           "
  755.     echo "        to call your local terminal program...                                  "
  756.     echo "                                                                                "
  757.     echo "        To open access to the complete disk enter the command: UNRESTRICT       "
  758.     echo "        and then use the system password -- otherwise you will remain in        "
  759.     echo "        the C:\\zcomm directory or one of its subdirectories.                    "
  760.     echo "                                                                                "
  761.     echo "        To see the files on the host enter: 'dir' and hit return.               "
  762.     echo "                                                                                "
  763.     echo "        TO DOWNLOAD a file from the host enter 'sz filename' (wildcards OK)     "
  764.     echo "            (Remember this is just like typing at the HOST keyboard...)         "
  765.     echo "                - For XMODEM enter 'sx filename' at HOST prompt -               "
  766.     echo "           - For KERMIT enter 'kermit sb filename' at Host prompt -             "
  767.     echo "                                                                                "
  768.     echo "        TO UPLOAD a file hit F1 to get into your terminal command mode and      "
  769.     echo "        then enter 'sz filename'.  In ZModem everything else is automatic.      "
  770.     echo "     - XMODEM enter 'rx filename' or 'rc filename' for CRCX at HOST prompt -    "
  771.     echo "        - KERMIT enter 'kermit rb' at HOST prompt then start your upload -      "
  772.     echo "                                                                                "
  773.     echo "        To leave a MESSAGE enter the command 'message' and follow prompts.      "
  774.     echo "          ---> To see this message anytime enter the command 'help' <---        "
  775.  
  776. :+++++++++++++++++++++++++++++--- That's it ---++++++++++++++++++++++++++++++
  777.