home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR10 / ZCEX1109.ZIP / ADVPHO.T next >
Text File  |  1992-10-22  |  35KB  |  964 lines

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