home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / zcomm.zip / ADVPHO.T next >
Text File  |  1990-05-12  |  31KB  |  864 lines

  1.     ::rev 4-15-90 for ZCOMM 17.28+
  2.     cls; goto cmdch
  3. ak    lput "\r\n\E[1;5mType space to Continue\E[m"; if y
  4.     lput "\E[2A\E[2K"
  5. busy    speed 1200 putw "ATM0H1\r"
  6. reset    speed 1200; putw "ATZ\r";pat 1 OK; wait -f3
  7. twx    if twxout speed 1200 %s8 f -qxh twxout;o
  8.     else echo " No file to Send. "
  9. att    set l 0; set m "0503"; set alds ",50312345678901,"
  10.     echo "Set for AT&T Calling Card"
  11. ddd    set l "1"; set m "1"; set alds ""
  12.     echo "Set for Direct Distance Dialing (Station to Station)"
  13. tryd    %telno
  14.  
  15.  
  16. waketb    put "\b\b\b"; sleep 3; pat; purgel; kill; pat 1i "A"; pat 9 OK; ena -d
  17.     while "L<5&&!m" mput "A" lput "!" sleep 2
  18.     wait -f2; if !1 while "L<4&&!m" mput "A" lput "@" sleep 3
  19.     if 1 put "TZ\r"; wait -f2
  20.     if 9 goto wak1
  21.     pat 1 ""; while "!9&&L<2" put "ATZ\r"  wait -f3
  22.     if 9 goto wak1
  23.     bye
  24.     while "L<9&&!m" mput "A" lput "#" sleep 3
  25.     pat 1i "A"; wait -f2; if !1 while "L<5&&!m" mput "A" lput "$" sleep 3
  26.     if 1 put "TZ\r"; wait -f2
  27.     if 9 goto wak1
  28.     pat 1 ""; while "!9&&L<2" put "ATZ\r"  wait -f3
  29.     if 9 goto wak1
  30.     sp 9600 echo "9600 bps"
  31.     bye; br; br; br; while "!9&&L<2" put "ATZ\r"  wait -f1
  32.     if 9 goto wak1
  33.     echo "2400 bps"; sp 2400
  34.     while "!9&&L<3" put "ATZ\r"  wait -f1
  35.     if 9 goto wak1
  36.     echo "1200 bps"; sp 1200
  37.     while "!9&&L<3" put "ATZ\r"  wait -f1
  38.     if 9 goto wak1
  39.     while "!9&&L<10" put "AT\r"  wait -f1
  40.     if 9 goto wak1
  41.     echo "No response From MODEM" dis -Q
  42.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  43.     if 9 goto wak1
  44.     echo "No response From MODEM"
  45.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  46.     if 9 goto wak1
  47.     echo "No response From MODEM: setting 2400 bps"; sp 2400
  48.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  49.     if 9 goto wak1
  50.     echo "No response From MODEM: setting 1200 bps"; sp 1200
  51.     while "!9&&L<20" o sleep 9 bye sleep 9 put "ATZ\r"  wait -f2
  52.     if 9 goto wak1
  53.     echo "No response From MODEM"
  54. wak1:    pat; pat 1i A
  55.     if iMODEM,C2400E sp 2400
  56.     while "L<9&&!m" mput "A" lput "%" sleep 3
  57.     wait -f2; if !1 while "L<9&&!m" mput "A" lput "^" sleep 3
  58.     pat; pat 1l "OK"; put "T\r"; wait -f3
  59.     if !1 putw "AT\r"
  60.     dis -t;  ret
  61.  
  62. ::
  63. :: Dial script for most 2400 bps modems uses speed fallback.
  64. ::  Environment variable MODEM checked for:
  65. ::    C2400E    US Robotics Courier 2400E (MNP)
  66. ::    HST    US Robotics Courier HST
  67. ::    HV96    Hayes V series 9600 bps
  68. ::    MM224    MultiTech 224
  69. ::    MM224E    MultiTech 224E (MNP)
  70. ::    MMV32    MultiTech MultiModemV32
  71. ::    SM1200    Hayes Smartmodem 1200
  72. ::    TB    Telebit TrailBLazer
  73. :: If the call is placed at >300 and <9600 bps, switch to 2400 bps.  Make the
  74. :: call.  If the called modem only supports 1200 or (ugh) 300 bps,
  75. :: the modem will drop back in speed.  The actual connect speed is indicated
  76. :: by a "CONNECT", "CONNECT 1200", or "CONNECT 2400" string.
  77. :: Fallback to 300 bps may be a bit messey, (depending on the answering
  78. :: modem, so a call originated at 300  bps will go out at that speed
  79. ::
  80. ::  It is important to give Xn value with highest possible n, e.g. X4
  81. ::
  82. ::  String vars: s0: original speed   s1:non empty to lock interface speed
  83. ::    s2: Current dial option   s3:Current telno
  84. ::      s4: Remaining alternate telnums    s5: provisional speed
  85. ::
  86. mm224    if "itelno,1" if dX echo "Vritual Channel 1"; return
  87.     if "itelno,2" if dX echo "Vritual Channel 2"; return
  88.     if "itelno,3" if dX echo "Vritual Channel 3"; return
  89.     if "itelno,1" port 1;  set dirrx "";  echo "Port 1"; return
  90.     if "itelno,2" port 2;  set dirrx "";  echo "Port 2"; return
  91.     if "%telno<2" echo "Please do not use \"call mm224\""; abort
  92.     if iMODEM,MM224 if S>2500 sp 2400
  93.     if iMODEM,MM224E if S>9600 sp 9600
  94.     if iMODEM,MMV32 if S>19200 sp 19200
  95.     if iMODEM,SM1200 if S>1201 sp 1200
  96.     if iMODEM,C2400E sp 2400
  97.     set? s0 S;  sets s4 %telno
  98. mm2l:    split s4 "+" ""; sets s4 %z1; sets s3 %z0
  99.     set s1 ""; split s3 "/" ""; sets s3 %z0; sets s2 %z1
  100.     handshake sw;  pat;  sets s5 "%s0"
  101.     echo "PORT = %dport  MODEM = %MODEM  modifier = %s2"
  102.     if js2,mnp set s1 "mnp"
  103.     if js2,_s set s1 "_s"
  104.     if js2,lock set s1 "lock"
  105.     if iMODEM,AX9624 if js2,mnp sp 19200
  106.     if iMODEM,TB if S>3000 if !%s1 set s1 "lock"
  107.     if iMODEM,HST if js2,mnp sp 19200  :: Change this to match sp in inithst
  108.     if js2,1200 sp 1200; set s5 1200
  109.     else if js2,300 sp 300; set s5 300
  110.     else if S==450 sp 300 echo "300 bps"
  111.     else if !%s1 if "S<9500&&S>1201" sp 2400 echo "2400 bps"
  112.     bye
  113.     gosub waketb        :: get modem to respond
  114.     if iMODEM,C2400E sp 2400
  115.     pat; pat 9 OK
  116.     if pMODEM,MM if js2,mnp   put "AT&E2 &E4 &E13 \44BA0 &B0\r"; wait -f2
  117.     if pMODEM,MM if js2,mnp_s put "AT&E2 &E5 &E13 \44BA0 &B0\r"; wait -f2
  118.     if iMODEM,HST if !js2,mnp put "AT&M0 X6 &B0 &H0 &R1 &I0\r"; wait -f2
  119.     if iMODEM,HST if js2,mnp put "AT&M5 X6 &B2 &H1 &R2 &I0 &K1\r"; wait -f2
  120.     if iMODEM,HST if js2,mnp_s put "AT&H2 &I1 &R1\r"; wait -f2
  121.     if iMODEM,C2400E if !js2,mnp put "AT&M0 &H0 &R1 &I0\r"; wait -f2
  122.     if iMODEM,C2400E if js2,mnp put "AT&M5 &H1 &R2 &I0 &K1\r"; wait -f2
  123.     if iMODEM,C2400E if js2,mnp_s put "AT&H2 &I1 &R1\r"; wait -f2
  124.     if iMODEM,AX9624 if js2,mnp put "ATX4\\V1\\J0\\A3\\N3\\Q3\r"; wait -f2
  125.     if iMODEM,AX9624 if js2,mnp_s put "ATX4\\V1\\J0\\A3\\N3\\Q1\r"; wait -f2
  126.     put "AT"
  127.     if pMODEM,MM if js2,a_mnp put "&E1 "
  128.     if pMODEM,MM if "as5<2500" put "\44MB%s5 "
  129.     if jMODEM,C2400E if js2,a_mnp put "&M4 "
  130.     if iMODEM,HST    if js2,a_mnp put "&M4 S15=16 "
  131.     if iMODEM,HST    if js2,300 put "&N1 "
  132.     if iMODEM,HST    if js2,1200 put "&N2 "
  133.     if iMODEM,HST    if js2,2400 put "&N3 "
  134.     if jMIDEM,HV if js2,v22 put "B0 "
  135.     ss s2 "(c:)(.*)";  if %z2 put "%z2 "        :: for extra commands
  136.     if iMODEM,TB if is5,300 put "S50=1 "
  137.     if iMODEM,TB if is5,1200 put "S50=2 "
  138.     if iMODEM,TB if is5,2400 put "S50=3 "
  139.     if iMODEM,TB if js2,fast z pW10000; put "S50=255 S7=50 "; if !%s1 set s1 "lock"
  140.     if iMODEM,TB if js2,mnp put "S95=1 "
  141.     if iMODEM,TB if js2,a_mnp put "S95=2 "
  142.     if iMODEM,TB if %s1 put "S66=1 S58=2 " if S==19200 put "S51=5 "
  143.     if iMODEM,TB if js2,_s put "S58=3 "
  144.     if iMODEM,TB if js2,v22 put "S90=1 "
  145.     if pMODEM,SM put "X3 "
  146.     if "%s3>8" put "S7=70 "        : longer wait if long distance
  147.     put "E1 Q0 S10=10 V1\r"; wait -f2
  148.     put "ATS6=3 S8=1 S0=0\r" wait -f2
  149.     if iMODEM,TB put "ATX3 S68=255 S111=0\r" wait -f2
  150.     if iMODEM,TB if js2,xmodem put "ATS111=20\r" wait -f2
  151.     if iMODEM,TB if js2,kermit put "ATS111=10\r" wait -f2
  152.     if pMODEM,MM put "ATX4 &Q0\r" wait -f2
  153.     if !%MODEM put "ATX3\r";  wait -f2    :: Change this for your modem
  154.     if iMODEM,C2400E if %s1 putw "AT&B6\r"; sp 9600
  155.     if %s1  if !Js1,s handshake slow; lput "Handshake SLOW: "
  156.     if %alds if ps3,0 putw "ATS8=10\r"
  157.     put "%mprefix";  put "%s3%alds";  dis -Q
  158.     if js2,man putw ";\r"; echo "Hit F1 when Tone is heard"; t; put "ATO"
  159.     put "\r";  dis -t
  160.     if "js3,;"  accept s1 "Lift Telephone Receiver, Hit ENTER"; o; return
  161.     pat 1 "CONNECT\r"; pat 2 "NO CARRIER"; pat 3 "BUSY"; pat 4 RING;
  162.     pat 5l "ECT 12"; pat 6l "ECT 24"; pat 7l "CONNECT FAST"
  163.     pat 8 "NO DIAL TONE"; pat 10l "CONNECT 300"
  164.     pat 11l "CONNECT 96"; pat 12l "CONNECT 192"
  165.     pat 13 "VOICE"; pat 14 "NO ANS"; pat 15l "CONNECT 4800"
  166.     wait -f72
  167.     while "4&&!L>3" wait -f40
  168.     if "n||9||2||3||4||13||14" goto sorry
  169.     dis -d
  170.     if dd while "!c&&L<20" sleep 1    : For modems with slow carrier det
  171.     if iMODEM,HST if "!hARQ" set s1 ""
  172.     if %s1 if "hCONNECT" ss y "[0-9]+"; estimate 0 z0; echo "Speed Locked"; goto mm2end
  173.     if "hARQ" echo "MNP Connected";  handshake both; goto arq
  174.     if "hREL" echo "MNP Connected";  handshake both; goto arq;
  175.     if "hERROR-CONTROL" echo "HV Connected";  handshake both; goto arq
  176.     if js2,mnp set s2 ""
  177. arq:    if "1||10" if is5,450 sp 450; echo "450 bps"; goto mm2end
  178.     if "1||10" sp 300 goto mm2end
  179.     if 5 sp 1200 goto mm2end
  180.     if 6 sp 2400 goto mm2end
  181.     if "du&&7" sp 9600 echo "9600 bps"; goto mm2end
  182.     if "7||12" sp 19200; goto mm2end
  183.     if 11 sp 9600; goto mm2end
  184. sorry:    echo "No Connect Message Detected."
  185.     : if iMODEM,TB sleep 10; pat; pat 1 OK; putw "ATN?\r" wait
  186.     if iMODEM,C2400E if %s1 putw "ATZ\r"
  187.     if %s4 echo "Attempting %s4";  speed s0;  goback mm2l
  188.     pat; bye; bye; fail
  189. mm2end:    pat
  190.         if js1,mnp sleep 15    : for gliches in MM224E
  191.     sets telno %s3        : Telephone number we connected to
  192.     if !js2,nodel queue delete
  193.     return
  194.  
  195.  
  196.  
  197. askspd    lput "1200 baud?"; if y sp 1200; return
  198.     lput "2400 baud?"; if y sp 2400; return
  199.     lput "4800 baud?"; if y sp 4800; return
  200.     lput "9600 baud?"; if y sp 9600; return
  201.     lput "19200 baud?"; if y sp 19200; return
  202.     lput "300 baud then."; sp 300; return
  203. callcis    speed 1200
  204.     if %s3 sets telno %s3; gosub tryd; if c sleep 20 put \3 return
  205.     speed 300
  206.     if %s2 sets telno %s2; gosub tryd; if c sleep 20 put \3 return
  207.     sp 1200
  208.     if %s5 sets telno %s5; gosub tryd; if c gosub tym12; return
  209.     if %s4 sets telno %s4; gosub tryd; if c gosub tel12; return
  210.     echo "Sorry, none of the numbers are working right now"
  211.     gosub ak
  212.     fail
  213. tel12    pat 1 TERMINAL
  214.     while "c&&!1" put "\r" wait -f2
  215.     if !c fail
  216.     pat 1 @
  217.     put "D1\r"; wait -f40
  218.     if !c fail
  219.     if !1 o fail
  220.     put "C 202202\r"
  221.     return
  222. tym24    wait -f5
  223.     in !c fail
  224.     put A pat 1 "log in"; wait
  225.     put "%s1\r"; return
  226. tym12    pat 1 x; wait
  227.     if !c fail
  228.     put A pat 1 "log in"; wait
  229.     if !c fail
  230.     put "%s1\r"; return
  231. xsetup    port 1; : if !c speed 1200 putw "ATZ\r"
  232.     pd1; pz480    : turn on time stamping, set PST timezone
  233.     set mprefix ATDP    : Pulse Dial
  234.     : set mprefix ATDT    : Tone Dial
  235.     set mcommand "gosub mm224"
  236.     : set mcommand "gosub dial"
  237.     set l "1"; set m "1"
  238.     set answerback "\r\nYOUR NAME CITY\r\n\21"
  239.     : ps8 :set C/G status line attribute to dim
  240.     : set phones "c:/phones.t"
  241.     echo "Resetting Function Keys"; reskeys
  242.     set f3 @rb;  set f4 "@echo Working...;  gosub tlearn"
  243.     set f6 "@accept s2 Receive-File: rc %s2"
  244.     set f7 "@accept s1 Send-File: sx %s1"
  245.     : set f8 "\PXXXXX"
  246.     : accept xpassword "\E[mMaster Password: \E[8m"; lput "\E[m"
  247.     set f9 "@gosub add"
  248.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  249.     if f/zmanh.hlp set helpfile "@!yhp /zmanh.hlp zmain"; set f10 "@help"
  250.     if fzmanh.hlp set helpfile "@!yhp zmanh.hlp zmain"; set f10 "@help"
  251.     set fs1 "@find speed %phones"
  252.     set fs2 "@accept s1 Name:; find \n%s1 %phones"
  253.     set fs3 "@find \\\;\r %phones"
  254.     set fs4 "@speed 1200 putw ATH\r"
  255.     set fs5
  256. @accept s1 "System name to call: "; queue add " call %s1"; queue list
  257.     set fs6
  258. @lput "Queue Entries:\n"; queue list; echo "Working..."; queue run
  259.     : display bell=visual
  260.     set emdir /memo; set twxfile twx;
  261.     : set call1 ATZ\r\336ATZ\r
  262.     set call2
  263. @bye; sleep 3; putw "ATZ\r"; sleep 5; putw "ATX1 M0 S0=1\r"; clears
  264.     : (AT commands above are repeated to make sure modem obeys them)
  265.     : set callpath /tmp/*.xx?
  266.     set outahost
  267. @bye; putw "ATZ\r"
  268.     :::  DO NOT USE BACKSLASHES FOR FILENAMES
  269.     : set calllog c:/calllog
  270.     : set rxlog c:/tmp/rxlog
  271.     : set txlog c:/tmp/txlog
  272.     : set tmp /yam/tmp
  273.     : set lib /yam/lib
  274.     set quitcmd \003\336off\r
  275.     if dc ps4 pn3 pr97    :if RGB, cyan, red stat, color rev video
  276.   : if dc ps11 pn14 pr30 :if RGB, yellow on black & rev. blue /w lt. bl. status
  277.     return
  278. setup    echo "Running ..."
  279.     set mprefix ATDP    : Pulse Dial
  280.     : set mprefix ATDT    : Tone Dial
  281.     p-1; set mcommand "gosub dial"
  282.     if da>1 goto setu1
  283.     if !flocal.t gosub sinit; gosub .local.t; goto setu1
  284.     gosub .local.t
  285.     echo "Hello %s6 %s7."
  286.     lput "Has your phone number or port configuration changed\r\n"
  287.     lput "since the last time you entered your name (y/n) ?"
  288.     if y del local.t; gosub sinit; gosub .local.t
  289.     if c gosub carrier
  290. setu1:    if dd pd1; pz480
  291.     pe0
  292.     set f3 @rb;  set f4 "@echo Working...;  gosub tlearn"
  293.     set f5 "@accept s1 Send-File(s): sz %s1"
  294.     set f6 "@accept s2 Receive-File: rc %s2"
  295.     set f7 "@accept s1 Send-File: sx %s1"
  296.     : set f8 "\PXXXXX"
  297.     set f9 "@gosub add"
  298.     set fs1 "@find speed %phones"
  299.     set fs2 "@accept s1 Name:; find \n%s1 %phones"
  300.     set fs3 "@find \\\;\r %phones"
  301.     set fs4 "@speed 1200 putw ATH\r"
  302.     set fs5
  303. @accept s1 "System name to call: "; queue add " call %s1"; queue list
  304.     set fs6
  305. @lput "Queue Entries:\n"; queue list; echo "Working..."; queue run
  306.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  307.     if f/zmanh.hlp set helpfile "@!yhp /zmanh.hlp zmain"; set f10 "@help"
  308.     if fzmanh.hlp set helpfile "@!yhp zmanh.hlp zmain"; set f10 "@help"
  309.     if da>1 return
  310.     : return : uncomment this line to remove automatic menu startup
  311.     sets menu %phones
  312.     cls; goto cmdch
  313. demo    cls
  314. cmdch:    pv0; echo " ZCOMM Beginner's Menu "
  315.     display nlmode nooverstrike
  316.     lput "\ns  Generate a script with AI \E[1mTurboLearn Script Writer\E[m(Tm)\n"
  317.     if fnewscr.t lput "e  Execute your new script in newscr.t\n"
  318.     lput "f  Flash-up HELP Processor\n"
  319.     lput "a  Add a new system entry to the Telephone Directory\n"
  320.     lput "c  Compuserve Online Demo (requires modem)\n"
  321.     lput "d  Dial telephone number and connect\n"
  322.     lput "g  Go Local (Direct Connection)\n"
  323.     lput "h  Host Operation demo (dial-in)\n"
  324.     lput "l  List file names in current directory\n"
  325.     lput "n  Newest files listed first\n"
  326.     if !dS lput "o  Display Ordering Information\n"
  327.     lput "r  Review (circular buffer search/cut/paste) demo\n"
  328.     lput "t  Call Telegodzilla (Omen's Software Downloading System)\n"
  329.     lput "u  Utility command demo\n"
  330.     lput "x  eXit to DOS\n"
  331.     lput "z  exit to ZCOMM command prompt\n\n"
  332.     display nonlmode
  333. choos:    acceptl1 s1 "Please enter your menu choice "
  334.     if is1,a gosub add; cls; goback cmdch
  335.     if is1,c call cidemo; cls; goback cmdch
  336.     if is1,d call xdnum; cls; goback cmdch
  337.     if is1,e call .newscr.t;  goback choos
  338.     if is1,f help; goback cmdch
  339.     if is1,g call glocal; cls; goback cmdch
  340.     if is1,h gosub host; host; return
  341.     if is1,l dirr; goback choos
  342.     if is1,n dirt; goback choos
  343.     if is1,o gosub order; goback choos
  344.     if is1,r kill; gosub review; goback choos
  345.     if is1,s echo "Working...";  gosub tlearn; acceptl1 s0 "Hit Enter ";  goback cmdch
  346.     if is1,t call telegodzilla; cls; goback cmdch
  347.     if is1,u gosub udemo; cls; goback cmdch
  348.     if is1,x x
  349.     if is1,y goto quitt
  350.     if is1,z goto quitt
  351.     cls; echo "Unknown Command"; goback cmdch
  352. udemo:    cls;  echo "Enabling debug output to show the commands"; pv4
  353.     echo "The find command searches files for a string, case insensitive"
  354.     find zcom *.t
  355.     gosub ak
  356.     echo "The sum command calculates Unix compatible file checksums"
  357.     sum local.t
  358.     gosub ak
  359.     echo "Word Count: lines, words, printing characters, and characters"
  360.     echo "The count of printing characters predicts ribbon usage!"
  361.     wc *.t
  362.     gosub ak
  363.     echo "The crc command calculates a 32 bit file CRC useful for comparing"
  364.     echo "Multiple copies of the same file for accurcacy and identity."
  365.     echo "(Compatible with PKZIP's CRC)"
  366.     crc local.t
  367.     gosub ak
  368.     cls
  369.     echo "Paced upload transmission demonstration"
  370.     echo "File Upload pacing is used with bulletin boards, etc."
  371.     echo "Note the EXTRA delay at the end of each line"
  372.     display nooverstrike
  373.     open %phones
  374.     echo "Let's just send a little bit from the END of the file"
  375.     seek -120
  376.     ph2; o; t -adhxtp
  377.     close; pv0; dis -dah
  378.     gosub ak
  379.     return
  380.  
  381. 73    speed 1200 %l-603-924-9809 t
  382. amrad-bbs    speed 2400 %l-703-734-1387 t
  383. amsat-bbs    speed 300 %l-512-852-8194 t
  384. caf        speed 1200 %s8-3406\;
  385. cidemo    speed 1200 set s1 "cis02"; gosub callcis
  386.     pat 0 OK;
  387.     pat 1i ID:
  388.     pat 2 "please log in: "
  389.     pat 3 "DISCONNECTED"
  390.     pat 4 "?? LOG"
  391.     pat 5i "more !"
  392.     pat 6$ "!"
  393.     pat 7i "continue!"
  394.     wait;  put 77770,101\r
  395.     pat 1i assword:; wait; if !1 goto cid2
  396.     echo "Sending PASSWORD"; put FREE-DEMO\r
  397.     wait
  398. cid2:    if "3||2" echo " Login may be possible through a Compuserve Node "
  399.     if "1||4||3||2" echo " Try Again Later "; o; sleep 50; return
  400.     pat;
  401.     pat 1i "menu !"
  402.     pat 2i "page !"
  403.     pat 3i "choice !"
  404.     pat 4i "continue!"
  405.     pat 5i "more !"
  406.     pat 6$ "!"
  407.     put \25s\r
  408.     wait put "\025t\r"
  409.     wait put "\0253\r"
  410.     wait put "\025s 1\r"
  411.     wait put "\025log\r"
  412.     pat 1i ID:
  413.     wait -f5
  414.     echo "Good Bye Cruel World"
  415.     close
  416.     o
  417.     gosub ak
  418.     gosub review
  419.     return
  420. review    if !fcdemo echo "Sorry, the file \"cdemo\" is missing."; return
  421.     kill; read cdemo
  422.     del cut
  423.     <revv
  424.     review
  425.     echo "Let's play with that file."
  426.     echo "First, a word count"
  427.     wc cut
  428.     echo "Next, 32 bit file CRC, then a Unix style checksum"
  429.     crc cut; sum cut
  430.     sleep 100
  431.     return
  432.  
  433. cis    speed 2400 nolog 239-6124
  434.     pat 1i "^"
  435.     while !1&&L<8 wait -f2 if !1 echo "Sending ^C" put "\3"
  436. cis:    lput "\E[H\E[2J"
  437.     lput "SIG Download Browse hot keys: F3=B Protocol F8=XMODEM F7=capture"
  438.     lput "\E[2;24r\E[?6h\E[H"
  439.     pat 1 ID:; wait
  440.     put 70001,0001\r pat 1 assword:; wait; put "wrongo\r"
  441.     pat 1 OK; pat 2 Plex!; pat 3 "\nFunction: "; pat 4 "!"
  442.     set f3 "@source %lib/kcisdl.t"
  443.     set f7 "@source %lib/ckcisdl.t"
  444.     set f8 "@source %lib/xkcisdl.t"
  445.     wait
  446.     if n o return
  447.     pat; t -fcs!p
  448.     return
  449. cis02    speed 2400 nolog 222-2151    : Compuserve via Tymnet 2400 bps
  450.     pat 1i x; wait -f5 put A pat 1 "log in"; wait
  451.     put "cis02;"; goto cis
  452. cis02    speed 1200 nolog 222-0900    : Compuserve via Tymnet
  453.     pat 1i x; wait put A pat 1 "log in"; wait
  454.     put "\030cis02;" goto cis
  455. cisdat    speed 1200 %l-604-687-7144    : Compuserve via Datapac
  456.     sleep 25
  457.     ena -t
  458.     put "..\r"
  459.     pat 1 "DATAPAC"
  460.     wait -f4
  461.     put "P 29400138\r"
  462.     dis -t
  463.     pat 1 "Name:"
  464.     wait -f20
  465.     put "cis\r"
  466.     goto cis
  467. cistel    speed 1200 295-3028        : Compuserve via Telenet
  468.     pat 1 TERMINAL
  469.     while !1 put "\r" wait -f1
  470.     pat 1 @
  471.     put "D1\r"; wait -f4
  472.     if !1 o abort
  473.     put "C 202202\r"
  474.     goto cis
  475.  
  476. navobsy        speed 1200 %l-202-653-1079 t -u7e
  477.     echo " type @tco for list of commands "
  478. nbs        speed 300 %l-301-948-5717 t
  479. nbs2        speed 300 %l-301-948-5718 t
  480. oem        speed 1200 %s8 pat 1i \5;wait;put \1;sb;o
  481. omen-tech    speed 1200 %s8 t
  482. pl24    speed 2400 241-0496 goto pl1    : People-Link via Telenet
  483. pl    speed 1200 295-3028        : People-Link via Telenet
  484. pl1:    patt; patt 1 TERMINAL
  485.     while !1 put "\r" wait -f1
  486.     pf40 patt 1 @
  487.     put "D1\r"; wait
  488.     if !1 o abort
  489.     put "set 0:33,64:1\r"; wait -f1
  490.     put "c 312 63\r"
  491.     pat 1 "PRESS <RETURN>:";  wait -f15;  put "\r"
  492.     pat 1 "ID:";  wait -f15;  put "myacct\r"
  493.     pat 1 "PASSWORD:";  wait -f15;  put "nothis\r"
  494.     set f9 "/next\r"; set f10 "/dlo;fil;xmo;\r\r"
  495.     t
  496. source1200    speed 1200 295-3028    : The Source via Telenet
  497. sourcex:    set  f7 "upi n b "
  498.     set  f9 "upi n g "
  499.     set f8 ",-,*,rb"
  500.     set f10 ",-,*,sb"
  501.     pf3
  502.     patt; patt 1 TERMINAL
  503.     while "L<5&&!1" put "\r" wait -f1
  504.     if !1 off
  505.     pf40 patt 1 @
  506.     put "D1\r"; wait
  507.     if !1 o abort
  508.     put "c 30124\r"
  509.     kill; patt; patt 1 SOURCE; wait
  510.     if !1 o abort
  511.     putw "id ABC123 notthis\r"
  512.     patt; pat 10c "-More-" "@put \r lput \r\E[A\E[2M\E[A"
  513.     pf9999; wait
  514. source300    speed 300 295-3028    : The Source via Telenet
  515.     goto sourcex
  516. telegodzilla    speed 1200 %s8-3746
  517.     ena -Z; display overstrike; cls
  518.     pat 1 "ease:"; wait -f20
  519.     if !1||!c echo "Access Failed"; o; return
  520.     put "\b\b%s6 %s7\r"; pat 1 ect;wait -f2
  521.     put "y"; pat 1 "-Host"; wait -f5
  522.     set s0 "TeleGodzilla"
  523. tele1:    echo "You are now Online to \42%s0\42."
  524.     echo "Type F1 when done."; pat;  t -Z!vn
  525.     lput "\Ez Do you wish to disconnect (y/n) "
  526.     if y echo " Disconnecting ... ";put \25\4; wait -f2; o; return
  527.     echo " **************  Rewinding the Capture Buffer  ************** "
  528.     rewind; wait -f0; goto tele1
  529.  
  530. vms    speed 9600;  display vt100;  set bs "\177";  set rubout "\b";  z pd30
  531.     t
  532.  
  533. host    echo " host " speed 1200
  534.     set welcome welcome.txt
  535.     set password Ritchie
  536.     set challenge challeng.txt
  537.     set unrestrict "CustomerSupport"    : WARNING - CHANGE THIS!!
  538.     set xhelpfile xyamhelp.t
  539.     set private private; set messages messages
  540.     set emdir "."; set twxfile twx;
  541.     set call2 ATZ\r\336\336ATM1X1S0=1\r\336ATM1X1S0=1\r\336\336
  542.     set outahost "@pk512; putw ATM0H1\r"
  543.     set baudstr "@gosub baud"
  544.     pc40
  545.     return
  546.  
  547. sinit    pv0;  cls
  548.     echo "    Initial setup for ZCOMM with ZMODEM, WXMODEM, etc.        "
  549.     echo "             I need some phone information.                    "
  550.     accept s6 " Your \E[1mFirst\E[0m name please "
  551.     accept s7 " Your Last name please "
  552.     set s8 ""
  553. getac:    accept s8 " Please enter your 3 digit telephone area code, plus <Enter> "
  554.     if !%s8 goto getac
  555.     echo "I need access numbers for the Compuserve Information Service."
  556.     : if dd lput "Shall I search for them (y/n) ?"
  557.     : if dd if y echo "300/1200 bps Access Numbers"; find "%s8 " cisnodes.lst
  558.     echo "Just hit <Enter> if your modem doesn't have the indicated speed."
  559.     accept s3 " Please enter the 1200 baud local Compuserve Node phone Number "
  560.     accept s2 " Please enter the 300 baud local Compuserve Node phone Number "
  561.     accept s5 " Please enter the 1200 baud local Tymnet Node phone Number "
  562.     accept s4 " Please enter the 1200 baud local Telenet Node phone Number "
  563.     echo "Creating disk file 'LOCAL.T' for future reference"
  564.     kill; pv0; create -y local.t
  565.     echof " :Area Code is \042%s8\042"
  566.     if %s2 echof " set s2 \042%s2\042"
  567.     if %s3 echof " set s3 \042%s3\042"
  568.     if %s4 echof " set s4 \042%s4\042"
  569.     if %s5 echof " set s5 \042%s5\042"
  570.     if %s6 echof " set s6 \042%s6\042"
  571.     if %s7 echof " set s7 \042%s7\042"
  572.     echof " set s8 1-503-621"
  573.     lput "\EzAre you using a Color Monitor? (y/n) "
  574.     if y echof " if dd&&dc ps4 pn3 pr97 pu6"; ps4 pn3 pr97 pu6
  575.     lput "\r\nIs your display adapter flicker/snow free? (y/n) "
  576.     if y echof " if dd&&dc display warpdrive"; display warpdrive
  577.     lput "\r\nIs your modem connected to COM2? (y/n) "
  578.     if y echof " port 2"; port 2
  579.     lput "\r\nDo you use DTMF (TouchTone) dialing? (y/n) "
  580.     if y echof " set mprefix ATDT"
  581.     lput "\r\nDoes your modem include 2400 bps or higher? (y/n) "
  582.     if y echof " set mcommand \"gosub mm224\""; set mcommand "gosub mm224"
  583.     close; echo "file created"
  584.     if dd echo "Searching for directory entries with your area code"
  585.     if dd find l-%s8- %phones
  586.     if dd echo "Please change the %phones lines shown above to suit your area."
  587.     if !is8,503 return
  588.     kill; pv0; create -+ local.t
  589.     lput "Is 621-3746 (Burlington Exchange) a local call for you ? (y/n) "
  590.     if y echof " set s8 621"
  591.     else echof " set s8 1-621"
  592.     close; return
  593. quitt:    echo "   Type 'menu' to return to this menu   "
  594.     if Jf10,@ echo "       Press F10 for Flash-Up Help      "
  595.     echo "\n\n  The following ABORT message is normal "
  596.     abort
  597. carrier    lput " Type \ESy\Eq if the modem is now connected to a computer: "
  598.     if y echo "OK, just checking"; sleep 30; return
  599.     lput "\r\n\nAlthough ZCOMM can operarte with the modem's\r\n"
  600.     lput "Carrier Detect signal always on, this script (and most other\r\n"
  601.     lput "scripts) require the Carrier Detect signal to read the actual\r\n"
  602.     lput "modem status.  Please adjust the modem accordingly; on the Hayes\r\n"
  603.     lput "SmartModem 1200, switch 6 should be UP. "
  604.     off
  605. xdnum    cls
  606.     if jmcommand,mm224 sp 2400; goto xd1
  607.     lput "Use 2400 Baud (y/n) ? "
  608.     if y speed 2400;  goto xd1
  609.     lput "Use 300 Baud (y/n) ? "
  610.     if y speed 300; goto xd1
  611.     speed 1200;  echo "1200 Baud, then."
  612. xd1:    accept telno "Enter Telephone Number: "
  613.     if !%telno return
  614.     if Jmcommand,2 gosub mm224
  615.     if Jmcommand,l gosub dial
  616.     sets s0 "%telno"
  617.     goto tele1
  618. glocal    cls;  display nonlmode
  619.     lput "Use Port 2 (y/n) ?"
  620.     if y port 2
  621.     else port 1
  622.     gosub askspd
  623.     set s0 "Local"
  624. tele9:    echo "You are now Online to %s0."
  625.     echo "Type F1 when done."; pat;  t -Z!v
  626.     lput "\Ez Finished talking now (y/n) "
  627.     if y goto tele2
  628.     echo " **************  Rewinding the Capture Buffer  ************** "
  629.     rewind; wait -f0; goback tele9
  630. tele2:    lput "\Ez Do you wish to disconnect (y/n) "
  631.     if y echo " Disconnecting ... ";put \25\4; wait -f2; o
  632.     source local.t
  633.     return
  634. order    if forder display overstrike; page order; return
  635.  cls display overstrike
  636.  lput "ZCOMM Registration, Typeset Manual Pages, ZSNP, and update disk sell for $40.00.\r\n"
  637.  lput "                 (Add $10 if you wish a PC-size binder)\r\n"
  638.  lput "\r\n"
  639.  lput "       Send check to Omen Technology, PO Box 4681, Portland OR 97208\r\n"
  640.  lput "Please see Chapter 3 of the ZCOMM User's Manual for more information."
  641.  lput "\r\n"
  642.  return
  643. baud    pat 1 "CONNECT\r\n"; pat 2 "NO CARRIER"
  644.     pat 5 "CONNECT 1200\r\n"; pat 3 "CONNECT 2400\r\n"
  645.     pe-20
  646.     wait -Ef25
  647.     dis -E
  648.     if 1 speed 300 return
  649.     if 5 speed 1200 sleep 20 return
  650.     if 3 speed 2400 sleep 20 return
  651.     kill create -+ rings
  652.     close
  653.     fail
  654.  
  655.     : inittb initializes the TrailBlazer NVRAM for these scripts
  656.     : It may be necessary ot change the 9600 speed below if the
  657.     : NVRAM has been set to a strange value by somebody else
  658. inittb    sp 9600; ena -t; gosub waketb
  659.     putw "aaaaat&F S0=0 S7=45 S50=0 S52=1 S53=1 S54=1 S58=3 S68=3\r\336\336"
  660.     putw "AAAATS51=255 \r\336\336"
  661.     putw "aaaatS111=255 S95=0 S92=1 S52=2\r\336\336"
  662.     putw "aaaATJ6S39=3\r\336\336"    : MNP bugfix magic incantation
  663.     putw "aaaAT&W\r\336\336"
  664.     return
  665.  
  666.     : initmm initializes the MultiTech error correcting 224 NVRAM 
  667.     : Change &E14 to &E15 to enable MNP compression
  668. initmm    speed 2400;  pat; pat 0 OK; pat 1 ERROR
  669.     put "AT &C1 E1 V1 X4 B1 &E0 S0=0 S7=45 S11=80 Q0\r"; wait -f5
  670.     if 1 echo "ERROR: cycle power on the modem and retry this script"; abort
  671.     put "AT &D3 &C1 &T5 &E7 &E8 &E10 &E14 \44BA1 &B1\r"; wait -f5
  672.     put at&w\r; wait -f5
  673.     return
  674.  
  675.     : initc24e initializes the US Robotics Courier 2400E
  676. initc24e    speed 2400;  pat; pat 0 OK; pat 1 ERROR
  677.     put "AT &F E1 V1 X6 B1 &G0 &Y1 S0=0 S7=45 S11=80 Q0\r"; wait -f5
  678.     if 1 echo "ERROR: cycle power on the modem and retry this script"; abort
  679.     put at&w\r; wait -f5
  680.     return
  681.  
  682.     : inithv96 initializes the Hayes V9600 NVRAM 
  683. inithv96    bye;  sleep 20;  speed 2400;  pat; pat 0 OK; pat 1 ERROR
  684.     set s1 "K4"; if dF set s1 "K3"
  685.     put "AT &F V1 X4 W1 B1 &K0 &Q5 S36=1 S37=0 S0=0 S7=45\r"; wait -f5
  686.     if 1 echo "ERROR: cycle power on the modem and retry this script"; abort
  687.     put "AT &D3 &C1 &R1 &%s1 &T5 &W0 &Y1 &W0\r"; wait -f5
  688.     return
  689.  
  690.     : initfc initializes a Fastcomm 2496t high speed modem
  691. initfc    sp 9600; gosub waketb
  692.     putw "AT #LDN #LCN S57=2 #W\r";  return
  693.  
  694.     : initsm initializes a Hayes Smartcom 2400
  695. initsm    putw "at &c1 &d2 x3 v1 e1 q0 &s1 s7=45\r"; sleep 5; putw at&w\r
  696.     return
  697.  
  698.     : initax9624 inits a Microcom AX/9624c MNP Class 6 modem    
  699. initax9624    bye;  sleep 20;  speed 2400;  pat; pat 0 OK; pat 1 ERROR
  700.     set s1 "\\Q1"; if dF set s1 "\\Q3"
  701.     put "AT &F V1 \\V1 &D3 Q0 E1 &C1 \\N0 X4 %s1 S0=0 S7=45\r"; wait -f5
  702.     if 1 echo "ERROR: Reset the modem and retry this script"; abort
  703.     put "AT &W\r"; wait -f5
  704.     return
  705.  
  706.     : Init HST MVRAM settings.  If you change the speed below, you must
  707.     : make corresponding changes in "mm224" and "call2h" !!!
  708. inithst    speed 19200; gosub waketb
  709.     speed 19200; putw "AT&F &B2 &W\r"
  710.     return
  711.  
  712.     :: Generate a script with TurboLearn Script Writer(TM)
  713. tlearn    set fa10 "" :: telephone number, and flag that telno was entered
  714.     if c goto connected
  715.     cls
  716.     accept fa10 "Enter Telephone Number "
  717. ag1:    accept fa1 "Enter Speed (300, 1200, 2400) "
  718.     if ifa1,2400 speed 2400 goto ag2
  719.     if ifa1,1200 speed 1200 goto ag2
  720.     if ifa1,300 speed 300 goto ag2
  721.     echo "Bad speed"; goback ag1
  722. ag2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  723.     lput "2    System uses 7 bits even parity\r\n"
  724.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  725.     lput "\r\n"
  726.     acceptl1 fa2 "Choose one of the above: "
  727.     lput "\r\n"
  728.     ena -8n
  729.     @%fa10
  730.     if !c echo "Sorry, no connection"; return
  731.     set fa5 ""
  732.     if ifa2,1 ena -8g; set fa5 "ena -8g"
  733.     if ifa2,2 ena -7e; set fa5 "ena -7e"
  734. connected:
  735.     echo "Finish with F1.  Use ALT-B to send a break if necessary"
  736.     learn -y tlrn.tmp
  737. cn2:    if !r echo "WARNING: Learning (recording) terminated prematurely!"
  738.     close
  739.     kill
  740.     create newscr.t
  741.     if !r abort
  742.     echo "Is this to become a Telephone Directory entry (y/n)?"
  743.     if !y goto nodir
  744.     accept fa6 "What directory entry name to use? "
  745.     echoc "%fa6    speed %fa1 %fa10 %fa5"
  746. nodir:    close;  set fa2 ""
  747.     echo "Should the script disconnect the phone line (y/n) ?"
  748.     if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
  749.     set fa2 "bye;  return"
  750.     echo "Should the script then exit to the Operating System (y/n)?"
  751.     if y  set fa2 "off"
  752.     !tlearn -r tlrn.tmp >>newscr.t
  753.     create -+ newscr.t; echof "    %fa2";  close
  754. scdone:    echo "Your new script is in the file 'newscr.t' !!"
  755.     if %fa10 echo "You may add this file to your Telephone Directory"
  756.     if %fa10 echo "Or execute it with 'call %fa6.newscr.t'";  return
  757.     echo "You may execute this file with 'source newscr.t'"
  758.     return
  759.  
  760.     :: Add a telephone directory entry
  761. add    if r close
  762.     cls
  763.     echo "Create New Phone Directory Entry"
  764. xg0:    accept fa3 "Enter new directory name: "
  765.     p?0
  766.     lput "Searching for duplicate name"
  767.     find "\n%fa3" %phones
  768.     if ? echo "Please choose another name"; goback xg0
  769.     accept fa4 "Enter Comments for this number: "
  770.     accept fa10 "Enter Telephone Number: "
  771. xg1:    accept fa1 "Enter Speed (300, 1200, 2400, 9600, 19200): "
  772.     if ifa1,19200 speed 2400 goto xg2
  773.     if ifa1,9600 speed 2400 goto xg2
  774.     if ifa1,2400 speed 2400 goto xg2
  775.     if ifa1,1200 speed 1200 goto xg2
  776.     if ifa1,300 speed 300 goto xg2
  777.     echo "Bad speed"; goback xg1
  778. xg2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  779.     lput "2    System uses 7 bits even parity\r\n"
  780.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  781.     lput "\r\n"
  782.     acceptl1 fa2 "Choose one of the above: "
  783.     lput "\r\n"
  784.     set fa5 ""
  785.     if ifa2,1 set fa5 " -8g"
  786.     if ifa2,2 set fa5 " -7e"
  787.     kill; pv0; create -+ %phones
  788.     if !%fa4 goto nobanr
  789.     echoc "%fa3    speed %fa1 echo \42%fa4\42 %fa10 t%fa5"
  790.     close; return
  791. nobanr:    echoc "%fa3    speed %fa1 %fa10 t%fa5"
  792.     close; return
  793.  
  794.     :: Login script for Byte Information Exchange
  795. bix        speed 19200  222-2151+222-0900
  796.         pat 1 "log in"
  797.         pat 2 "error" "\r"
  798.         pat 3 "user name:"
  799.         pat 5 "host shut"
  800.         wait -f4; put "A"; wait -f2
  801.         set s9 "login"; pf15
  802. bix:        put "BIX\r"
  803.         pat 4i "ame?"; wait
  804.         if 5 fail
  805.         if "c&&!4" goback bix
  806.         if jargs,new put "new\r";  t; quit
  807.         put "accntname\r"
  808.         pat 1i "assword:"; wait
  809.         dis -h;  put "notthis\r"
  810.         if dZ zmodem pl8192    :: Temporary - see manual
  811.         if dZ ena -yZ        :: Disable ZMODEM Challenge to save time
  812.         if jargs,h ena -h
  813.         pat; pat 1$ "\n:"
  814.         wait
  815.         if "hYou have [*1-9]" source bixmaild.t
  816.         expand bixmailu.t 002*
  817.         if jargs,off off
  818.         t
  819.  
  820. genie        speed 1200 287-9045
  821.         lput "\E[H\E[2J"
  822.         lput "\E[1mDownload hot key: F3=XMODEM F8=OverThruster\E[m"
  823.         lput "\E[2;24r\E[?6h\E[H"
  824.         ena -7e; pat 1 "U#"
  825.         while "c&&L<8&&!1" put "\r" wait -f2
  826.         if !1 echo "No Response from Genie"; o; fail
  827.         pat 2 "PASS"
  828.         while !2 put "abc12345,\r"  wait -f5
  829.         put "abcd\r"
  830. gen3:        set f3 "@set s5 xx; source %lib/gekxdl.t"
  831.         set f8 "@set s5 x; source %lib/gekxdl.t"
  832.         pO20; if S>2400 pO40
  833.         ph2; ena -h
  834.         t; ret
  835. dial    pat
  836.     if "%telno<2" echo "Please do not use \"call dial\""; abort
  837.     bye
  838.     if "%mprefix<2" goto mandial
  839.     pat 9 K\r\n; ena -d
  840.     put "ATZ\r"; wait -f3; if !9 wait -f3
  841.     if !9 put "AT E1 Q0 S7=60 V1 X1\r"; wait -f3
  842.     if "!9&&S>1201" speed 1200 put "ATZ\r"; wait -f3; if !9 wait -f3
  843.     if "!9&&S>301" speed 300 put "ATZ\r"; wait -f3; if !9 wait -f3
  844.     if !9 put "AT E1 Q0 S7=60 V1 X1\r"; wait -f3
  845.     if !9 echo "No response From MODEM"; fail
  846.     sleep 4
  847.     put "ATS6=3 S8=4 S0=0\r" wait -f2
  848.     pat 1l CONNECT; pat 2 "NO CARRIER"; pat 3 "BUSY"; pat 4 RING;
  849.     pat 0c ";"
  850.     dis -d
  851.     put %mprefix; putw %telno\r
  852.     if 0 wait -f30; accept s1 "Hit ENTER to Hang Up"; o; return
  853.     wait -f60
  854.     while "4&&!L>3" wait -f30
  855.     while "!c&&L<20" sleep 1    : Some modems are slow on carrier det
  856.     if 1 pat; return
  857.     if !9 bye
  858.     pat; bye; fail
  859.     echo "fail DIDN't FAIL!!"
  860. mandial:    echo "Please dial %telno, type 'y' when connected, 'n' if failed"
  861.     if y return
  862.     fail
  863.  
  864.