home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / BBS / MISC / SCRIPTS.ZIP / PHONES.T < prev    next >
Encoding:
Text File  |  1991-06-28  |  13.3 KB  |  366 lines

  1. -Revised  06-28-91 for Professional-YAM 17.78+
  2.  
  3. waketb    ena -t; ena -d
  4.     pat; purgel; kill; pat 8 ERROR; pat 9 OK
  5.     if iMODEM,tb.t goto wak0
  6.     put "ATZ\r"; wait -f2
  7.     put "ATE1Q0\r"; wait -f2
  8.     if 9 goto wak9
  9. wak0:    put "aaaaaa ATZ\r";  wait -f2
  10.     if 8 put "ATZ\r"; wait -f2
  11.     put "aaaaaa ATE1Q0\r"; wait -f2
  12.     if 9 goto wak9
  13.     pat 1i "A";
  14.     while "L<5&&!m" mput "A" lput "!" sleep 2
  15.     wait -f2; if !1 while "L<4&&!m" mput "A" lput "@" sleep 3
  16.     if 1 put "TZ\r"; wait -f2
  17.     if 9 goto wak1
  18.     pat 1 ""; while "!9&&L<2" put "ATZ\r"  wait -f3
  19.     if 9 goto wak1
  20.     bye
  21.     while "L<9&&!m" mput "A" lput "#" sleep 3
  22.     pat 1i "A"; wait -f2; if !1 while "L<5&&!m" mput "A" lput "$" sleep 3
  23.     if 1 put "TZ\r"; wait -f2
  24.     if 9 goto wak1
  25.     pat 1 ""; while "!9&&L<2" put "ATZ\r"  wait -f3
  26.     if 9 goto wak1
  27.     sp 9600 echo "9600 bps"
  28.     bye; br; br; br; while "!9&&L<2" put "ATZ\r"  wait -f1
  29.     if 9 goto wak1
  30.     echo "2400 bps"; sp 2400
  31.     while "!9&&L<3" put "ATZ\r"  wait -f1
  32.     if 9 goto wak1
  33.     echo "1200 bps"; sp 1200
  34.     while "!9&&L<3" put "ATZ\r"  wait -f1
  35.     if 9 goto wak1
  36.     while "!9&&L<10" put "ATE1Q0\r"  wait -f1
  37.     if 9 goto wak1
  38.     echo "No response From Modem" dis -Q
  39.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  40.     if 9 goto wak1
  41.     echo "No response From Modem"
  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: setting 2400 bps"; sp 2400
  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 1200 bps"; sp 1200
  48.     while "!9&&L<20" o sleep 9 bye sleep 9 put "ATZ\r"  wait -f2
  49.     if 9 goto wak1
  50.     echo "No response From Modem"
  51. wak1:    pat; pat 1i A
  52.     put "ATE1Q0\r"; sleep 2
  53.     while "L<9&&!m" mput "A" lput "\045" sleep 3
  54.     wait -f2; if !1 while "L<9&&!m" mput "A" lput "^" sleep 3
  55.     pat; pat 1l "OK"; put "T\r"; wait -f3
  56.     if !1 putw "ATE1Q0\r"
  57. wak9:    pat;  dis -t;  ret
  58.  
  59.  
  60. call2    sp 19200; gosub waketb; putw "ATM0H1\r";  sleep 20
  61.     sp 19200; gosub waketb; putw "ATX3Q0M0S10=10S50=0S0=1S95=2S7=30\r";
  62. call1    sp 19200; gosub waketb;  putw ATM0H1\r"
  63. call2e    bye; sp 9600; if iMODEM,mmv32.t sp 19200
  64.     gosub waketb; pat 1 OK
  65.     put "ATX4 Q0 &Q0 H0 M0 B1 S0=1 &E1 &E4 &E14 \44BA0 &B0\r"; wait -f2
  66.     handshake on
  67. call1e    bye; bye; sp 9600; handshake off; gosub waketb; putw ATM0H1\r"
  68. call1h    bye; sp 19200; gosub waketb; putw ATM0H1\r"
  69. call2h    bye; sp 38400         :: Change this to match speed in inithst
  70.     gosub waketb; pat 1 OK
  71.     put "ATX6 Q0 S0=1 &A2 &B2 B0 S28=0 &H1 &I0 &K0 &M4 &R2 &Y0\r"; wait -f2
  72.     :: put "AT&K3 S15=16\r"; wait -f2    :: Dual Standard/v.42bis
  73.     put "AT&K3\r"; wait -f2        :: Dual Standard/v.42bis
  74.  
  75.  
  76. outahost    bye; sp 2400; call waketb; putw "ATM0\r"
  77.     pH0; pS60; set remote "Local"; set disks "abcd"; set dirrx ""
  78.     put "ATH1\r"; type rxlog;  set mprompt "\r\E[1m%drive:\L%pwd\E[m <<<: "
  79.     quit
  80.  
  81. att    set l 0; set m "0503"; set alds ",50312345678901,"
  82.     echo "Set for AT&T Calling Card"
  83. ddd    set l "1"; set m "1"; set alds ""
  84.     echo "Set for Direct Distance Dialing (Station to Station)"
  85.  
  86. ::
  87. :: Advanced Dial shell  Rev 5-8-91
  88. ::
  89. ::  String vars: s0: original speed   s1:non empty to lock interface speed
  90. ::    s2: Current dial option   s3:Current telno
  91. ::      s4: Remaining alternate telnums    s5: provisional speed
  92. ::    s8: Result string from modem    s9: empty means no connection
  93. ::
  94. ::    Bypass fail command if called as gosub adial,nofail
  95. ::
  96.  
  97. :: Call modem specific init routine
  98. initmodem
  99.     gosub init.%lib/%MODEM
  100.  
  101. adial    
  102.     set s8 "h/w"; set s9 "port"
  103.     if "itelno,1" if dX echo "Vritual Channel 1"; return
  104.     if "itelno,2" if dX echo "Vritual Channel 2"; return
  105.     if "itelno,3" if dX echo "Vritual Channel 3"; return
  106.     if "itelno,1" port 1;  set dirrx "";  echo "Port 1"; return
  107.     if "itelno,2" port 2;  set dirrx "";  echo "Port 2"; return
  108.     set s8 ""; set s9 ""
  109.     if "%telno<2" echo "Please do not use \"call adial\""; 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 s8 ""; 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; if "!jargs,nofail" 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.  
  140.     : Omen's setup entry calls phones.ts for system specific setup
  141. setup    if dd pd1; pz480    : turn on time stamping, set PST timezone
  142.     : port 1    : A possible default port for DOS
  143.     : port tty1A    : A possible default port for Unix
  144.     : if !c speed 1200 putw "ATZ\r"
  145.     set mprefix ATDT    : Tone Dial
  146.     : set mprefix ATDP    : Pulse Dial
  147.     set mcommand "gosub adial"
  148.     set l "1"; set m "1"
  149.     set answerback "\r\nYOUR NAME CITY\r\n\21"
  150.     : ps8 :set C/G status line attribute to dim
  151.     : set phones "c:/phones.t"
  152.     reskeys
  153.     set f3 @rb;  set f4 "@echo working...;  gosub tlearn"
  154.     set f6 "@accept s2 Receive-File: rc %s2"
  155.     set f7 "@accept s1 Send-File: sx %s1"
  156.     set f8 "\PXXXXX"
  157.     set f9 "@gosub add"
  158.     : accept xpassword "\E[mMaster Password: \E[8m"; lput "\E[m"
  159.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  160.     if f/umanh.hlp set helpfile "@!yhp /umanh.hlp main"; set f10 "@help"
  161.     if fumanh.hlp set helpfile "@!yhp umanh.hlp main"; set f10 "@help"
  162.     set fs1 "@find speed %phones"
  163.     set fs2 "@accept s1 Name:; find \n%s1 %phones"
  164.     set fs3 "@find \\\;\r %phones"
  165.     set fs4 "@speed 1200 putw ATH\r"
  166.     set fs5
  167. @accept s1 "System name to call: "; queue add " call %s1"; queue list
  168.     set fs6
  169. @lput "Queue Entries:\n"; queue list; echo "Working..."; queue run
  170.     : display bell=visual
  171.     :::  DO NOT USE BACKSLASHES FOR FILENAMES
  172.     : set calllog c:/calllog
  173.     : set rxlog c:/tmp/rxlog
  174.     : set txlog c:/tmp/txlog
  175.     : set tmp /yam/tmp
  176.     : set lib c:/yam/lib
  177.     set quitcmd \003\336off\r
  178.     : if dc pn3  ps4  pr97    :if RGB, cyan, red stat, blu/y rev video
  179.     : if dc ps11 pn14 pr30  :if RGB, y on bl, rev. blue on lt. bl. status
  180.     set s0 ""
  181.     setc pho "%phones\&s";  if f%pho source %pho    : find phones.ts file
  182.     if %f10 echo "Hit F10 for help"
  183.     if %s0 return
  184.     set lib "c:/yam/lib"
  185.     set MODEM "mm224e.t"
  186.     echo "Initializing dialer script as %lib/%MODEM"
  187.     return
  188. omen-tech    speed 1200 %l-503-621-3746 t
  189. omen-tech    speed 1200 621-3746 t
  190. omen-voice    %l-503-621-3406\;
  191.         echo " Type Shift-F4 to Disconnect "
  192.  
  193. status        pe0 cls while !k lput \EH s
  194. upgrade        goto ug1
  195. telegodzilla    cls
  196. ug1:    echo "Demand Upgrade(TM): Omen Technology's TeleGodzilla system"
  197.     accept s7 "Please enter your LAST name: "; accept s6 "First name: "
  198.     speed 2400 %l-503-621-3746
  199.     display overstrike; cls; pat 1 "ease:"; wait -f20
  200.     if !1||!c echo "Access Failed"; o; fail
  201.     put "\b\b%s6 %s7\r"; pat 1 ect;wait -f2
  202.     put "y"; pat 1 "-Host"; wait -f9
  203.     if iremote,upgrade; zcommand "sz -n upgrade/yam.eqe upgrade/newest.meq upgrade/read.meq"
  204.     if iremote,upgrade; putw "bye\r"; off
  205.     t
  206.  
  207. vms        speed 1200 %m-641-0000 display vt; set bs "\177"; t
  208.  
  209. z89        port 2; speed 4800 t
  210.  
  211.  
  212.     :: Generate a script with TurboLearn Script Writer(TM)
  213. tlearn    set fc10 "" :: telephone number, and flag that telno was entered
  214.     if c echo "Already connected (Carrier Detect is ON)"; goto connected
  215.     cls
  216.     accept fc10 "Enter Telephone Number "
  217. ag1:    accept fa1 "Enter Speed (300, 1200, 2400) "
  218.     if ifa1,2400 speed 2400 goto ag2
  219.     if ifa1,1200 speed 1200 goto ag2
  220.     if ifa1,300 speed 300 goto ag2
  221.     echo "Bad speed"; goback ag1
  222. ag2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  223.     lput "2    System uses 7 bits even parity\r\n"
  224.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  225.     lput "\r\n"
  226.     acceptl1 fa2 "Choose one of the above: "
  227.     lput "\r\n"
  228.     ena -8n
  229.     @%fc10
  230.     if !c echo "Sorry, no connection"; return
  231.     set fa5 ""
  232.     if ifa2,1 ena -8g; set fa5 "ena -8g"
  233.     if ifa2,2 ena -7e; set fa5 "ena -7e"
  234. connected:
  235.     echo "Finish with F1.  Use ALT-B to send a break if necessary"
  236.     learn -y tlrn.tmp
  237. cn2:    if !r echo "WARNING: Learning (recording) terminated prematurely!"
  238.     close
  239.     kill
  240.     create newscr.t
  241.     if !r abort
  242.     echo "Is this to become a Telephone Directory entry (y/n)?"
  243.     if !y goto nodir
  244.     accept fa6 "What directory entry name to use? "
  245.     echoc "%fa6    speed %fa1 %fc10 %fa5"
  246. nodir:    close;  set fa2 ""
  247.     echo "Should the script disconnect the phone line (y/n) ?"
  248.     if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
  249.     set fa2 "bye;  return"
  250.     echo "Should the script then exit to the Operating System (y/n)?"
  251.     if y  set fa2 "off"
  252.     !tlearn -r tlrn.tmp >>newscr.t
  253.     create -+ newscr.t; echof "    %fa2";  close
  254. scdone:    echo "Your new script is in the file 'newscr.t' !!"
  255.     if %fc10 echo "You may add this file to your Telephone Directory"
  256.     if %fc10 echo "Or execute it with 'call %fa6.newscr.t'";  return
  257.     echo "You may execute this file with 'source newscr.t'"
  258.     return
  259.  
  260.  :: Add a telephone directory entry
  261. add    if r close
  262.     cls
  263.     echo "Create New Phone Directory Entry"
  264. xg0:    accept xfa3 "Enter new directory name: "
  265.     p?0
  266.     lput "Searching for duplicate name"
  267.     find "\n%xfa3" %phones
  268.     if ? echo "Please choose another name"; goback xg0
  269.     accept xfa4 "Enter Comments for this number: "
  270.     accept xfa10 "Enter Telephone Number: "
  271. xg1:    accept xfa1 "Enter Speed (300, 1200, 2400, 9600, 19200): "
  272.     if ixfa1,19200 speed 2400 goto xg2
  273.     if ixfa1,9600 speed 2400 goto xg2
  274.     if ixfa1,2400 speed 2400 goto xg2
  275.     if ixfa1,1200 speed 1200 goto xg2
  276.     if ixfa1,300 speed 300 goto xg2
  277.     echo "Bad speed"; goback xg1
  278. xg2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  279.     lput "2    System uses 7 bits even parity\r\n"
  280.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  281.     lput "\r\n"
  282.     acceptl1 xfa2 "Choose one of the above: "
  283.     lput "\r\n"
  284.     set xfa5 ""
  285.     if ixfa2,1 set xfa5 " -8g"
  286.     if ixfa2,2 set xfa5 " -7e"
  287.     kill; pv0; create -+ %phones
  288.     if !%xfa4 goto nobanr
  289.     echoc "%xfa3    speed %xfa1 echo \42%xfa4\42 %xfa10 t%xfa5"
  290.     close; return
  291. nobanr:    echoc "%xfa3    speed %xfa1 %xfa10 t%xfa5"
  292.     close; return
  293.  
  294.     :: Display the colors generated by various numeric parameters
  295. colors    if !dd echo "For DOS flavors only"; abort
  296.     set s0 0; cls
  297.     p#255; p$5; cls; display noautowrap
  298.     while L<129 obey "pn%s0" lput "\E[m %s0  \r\n" setn s0 s0+1
  299.     pn130; p$80; p#24;  lput "\E[10;H\E[m"
  300.     lput "            For BLINKING add 128\r\n"
  301.     pn3; lput "\E[m"
  302.     lput "    Pro-YAM Colors (*, @, n, r, s and u Numeric Parameters)\r\n"
  303.     return
  304.  
  305.     : Assumes drive c: and host directory c:/host
  306.     : Also assumes a c:/tmp directory
  307. host    echo " Entering Host Operation: MODEM=%MODEM"
  308.     set emdir c:/memo; set twxfile twx;
  309.     set lib "c:"; set disks "c"    : Must be lower case
  310.     : set rcmdlog "c:/tmp/rcmds"    : Log of remotely entered commands
  311.     set phones "c:/phones.t"
  312.     set dirrx "c:/tmp"
  313.     set callers c:/tmp/callers
  314.     set welcome
  315. @typ welcome.txt; lput "\E[2\07324r\E[2J\E[?6h%s9 %remote\n"; purgek
  316.     set f9
  317. @lput "\E[2\07324r\E[2J\E[?6h%s9 %remote\n"
  318.     : set password Ritchie
  319.     set password ""            : Don't ask for a password
  320.     set rxlog c:/host/rxlog        : Log of received files
  321.     set txlog c:/tmp/txlog        : Log of transmitted files
  322.     set plog c:/tmp/plog        : Performance log
  323.     set unrestrict "Wrong"        : Password used by unrestrict cmd
  324.     set xhelpfile c:/HOST/xyamhelp.t
  325.     set private c:/memo/private    : Where private messages are stored
  326.     set messages c:/host/messages    : Where public messages are stored
  327.     set answerback "\r\nUnedited phones.t\r\n\21"
  328.     set callpath c:/tmp/*.xx?    : For outcall queue
  329.     : the next line causes checkrmt.t to check each host mode command
  330.     set rmtcheck "@if !irmtcmd,rz source C:/host/checkrmt.t"
  331.     set menu /host/menu.hst        : menu for callers
  332.     : Example setting for "bbs" param.  See manual chapter on Security
  333.     if !dX set bbs "~/l.com >com1"
  334.     c:
  335.     set home \HOST; cd        : This must start with \
  336.     port 2; o            : Turn off port 2
  337.     port 1; bye; speed 2400        : Initialize port 1
  338. host2:
  339.     set outahost "@gosub outahost"        : to turn off modem autoanswer
  340.     set baudstr "@gosub .%lib/baud2.t"    : syncs to caller's speed
  341.     if !%challenge set challenge "@gosub .%lib/challeng.t"
  342.     set call1 "@bye;sleep 100;sp 1200;putw \5\r\336O111211311122\r\336I\r"
  343.     set call2 "@bye;sleep 100;sp 1200;putw \5\r\336O111111311122\r\336I\r"
  344.     if iMODEM,tb.t set call1 "@gosub call1"; set call2 "@gosub call2"
  345.     if iMODEM,hu96.t set call1 "@sp 1200; gosub waketb; putw ATM0H1\r"
  346.     if iMODEM,hu96.t set call2 "@sp 1200; gosub waketb; putw ATS0=1\r"
  347.     if iMODEM,fc.t set call1 "@sp 19200; gosub waketb; putw ATM0H1\r"
  348.     if iMODEM,fc.t set call2 "@sp 19200; gosub waketb; putw ATS0=1\r"
  349.     if pMODEM,mm set call1 "@gosub call1e"; set call2 "@gosub call2e"
  350.     if iMODEM,hst.t set call1 "@gosub call1h"; set call2 "@gosub call2h"
  351.     : set call3
  352.     : @echo "Now awaiting incoming calls.  Press F1 to exit."
  353.     : The next two lines configure parameters for the link command
  354.     if "!dX&&!dD" px2; py19200; set linkpass "Giznoid";
  355.     if "!dX&&!dD" set outalink "@kill; put \r\4;o;port 1;bye"
  356.  
  357.     zmodem pp15 pt30        : set faster timeouts
  358.     set exrc "@echo EXRC; handshake off; display nobell=visual novt"
  359.     display bell=visual        : silence is golden
  360.     kermit pd0            : No delay on Kermit
  361.     pH180                : 180 seconds inactivity timeout
  362.     pS10                : 10 seconds flow control recovery
  363.     pk3                : dump circ buffer on ^C
  364.     host
  365.  
  366.