home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / zcme1761.zip / ADVPHO.T next >
Text File  |  1990-10-08  |  35KB  |  962 lines

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