home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
SCRIPTS.ZIP
/
PHONES.T
< prev
next >
Wrap
Text File
|
1995-06-02
|
13KB
|
351 lines
-Revised 5-3-94 for Professional-YAM
waketb ena -t; ena -d
pat; purgel; kill; pat 8 ERROR; pat 9 OK
if iMODEM,tb.t goto wak0
put "ATZ\r"; wait -f2
put "ATE1Q0\r"; wait -f2
if 9 goto wak9
wak0: put "aaaaaa ATZ\r"; wait -f2
if 8 put "ATZ\r"; wait -f2
put "aaaaaa ATE1Q0\r"; wait -f2
if 9 goto wak9
pat 1i "A";
while "L<5&&!m" mput "A" lput "!" sleep 2
wait -f2; if !1 while "L<4&&!m" mput "A" lput "@" sleep 3
if 1 put "TZ\r"; wait -f2
if 9 goto wak1
pat 1 ""; while "!9&&L<2" put "ATZ\r" wait -f3
if 9 goto wak1
bye
while "L<9&&!m" mput "A" lput "#" sleep 3
pat 1i "A"; wait -f2; if !1 while "L<5&&!m" mput "A" lput "$" sleep 3
if 1 put "TZ\r"; wait -f2
if 9 goto wak1
pat 1 ""; while "!9&&L<2" put "ATZ\r" wait -f3
if 9 goto wak1
sp 9600 echo "9600 bps"
bye; br; br; br; while "!9&&L<2" put "ATZ\r" wait -f1
if 9 goto wak1
echo "2400 bps"; sp 2400
while "!9&&L<3" put "ATZ\r" wait -f1
if 9 goto wak1
echo "1200 bps"; sp 1200
while "!9&&L<3" put "ATZ\r" wait -f1
if 9 goto wak1
while "!9&&L<10" put "ATE1Q0\r" wait -f1
if 9 goto wak1
echo "No response From Modem" dis -Q
bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r" wait -f2
if 9 goto wak1
echo "No response From Modem"
bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r" wait -f2
if 9 goto wak1
echo "No response From Modem: setting 2400 bps"; sp 2400
bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r" wait -f2
if 9 goto wak1
echo "No response From Modem: setting 1200 bps"; sp 1200
while "!9&&L<20" o sleep 9 bye sleep 9 put "ATZ\r" wait -f2
if 9 goto wak1
echo "No response From Modem"
wak1: pat; pat 1i A
put "ATE1Q0\r"; sleep 2
while "L<9&&!m" mput "A" lput "\045" sleep 3
wait -f2; if !1 while "L<9&&!m" mput "A" lput "^" sleep 3
pat; pat 1l "OK"; put "T\r"; wait -f3
if !1 putw "ATE1Q0\r"
wak9: pat; dis -t; ret
outahost bye; sp 2400; call waketb; putw "ATM0\r"
pH0; pS60; set remote "Local"; set disks "abcd"; set dirrx ""
put "ATH1\r"; type rxlog; set mprompt "\r\E[1m%drive:\L%pwd\E[m <<<: "
quit
::
:: Advanced Dial shell Rev 5-8-91
::
:: String vars: s0: original speed s1:non empty to lock interface speed
:: s2: Current dial option s3:Current telno
:: s4: Remaining alternate telnums s5: provisional speed
:: s8: Result string from modem s9: empty means no connection
::
:: Bypass fail command if called as gosub adial,nofail
::
cellular
set cellular "Y"
echo " Cellular options set for this Session "
return
:: Call modem specific init routine
initmodem
sets s0 %args
gosub init.%lib/%MODEM
adial
set s8 "h/w"; set s9 "port"
if "itelno,1" if dX echo "Virtual Channel 1"; return
if "itelno,2" if dX echo "Virtual Channel 2"; return
if "itelno,3" if dX echo "Virtual Channel 3"; return
if "itelno,1" port 1; set dirrx ""; echo "Port 1"; return
if "itelno,2" port 2; set dirrx ""; echo "Port 2"; return
set s8 ""; set s9 ""
if "%telno<2" echo "Please do not use \"call adial\""; abort
set? s0 S; sets s4 %telno
adia2: split s4 "+" ""; sets s4 %z1; sets s3 %z0
set s1 ""; split s3 "/" ""; sets s3 %z0; sets s2 %z1
handshake sw; pat; sets s5 "%s0"
echo "PORT = %dport MODEM = %MODEM modifier = %s2"
if js2,mnp set s1 "mnp"
if js2,_s set s1 "_s"
if js2,lock set s1 "lock"
if js2,1200 sp 1200; set s5 1200
else if js2,300 sp 300; set s5 300
else if S==450 sp 300 echo "300 bps"
else if !%s1 if "S<9500&&S>1201" sp 2400 echo "2400 bps"
if !dv bye
:: set up for modem specific dialnum routine
set s8 ""; set s9 ""
gosub dialnum.%lib/%MODEM
pat; if %s9 goto adiend
if %s4 echo "Attempting %s4"; speed s0; goback adia2
bye; bye; if "!jargs,nofail" fail
return
adiend: sets telno %s3 : Telephone number we connected to
if !js2,nodel queue delete
if dl<2 echo "Please type t<Enter> to enter terminal function."
return
att set l 0; set m "0503"; set alds ",50362112340123,"
echo "Set for AT&T Calling Card"
ddd set l "1"; set m "1"; set alds ""
echo "Set for Direct Distance Dialing (Station to Station)"
: default setup entry calls phones.ts for system specific setup
setup set answerback "\r\nYOUR NAME CITY\r\n\21"
set quitcmd \003\336off\r
set mprefix ATDT : Tone Dial
: set mprefix ATDP : Pulse Dial
set mcommand "gosub adial"
set l "1"; set m "1"
set f3 @rb; set f4 "@echo working...; gosub tlearn"
set f6 "@accept s2 Receive-File: rc %s2"
set f7 "@accept s1 Send-File: sx %s1"
set f8 "\PXXXXX"
set f9 "@gosub .%lib/add.t"
set fs1 "@find speed %phones"
set fs2 "@accept s1 Name:; find \n%s1 %phones"
set fs3 "@find \\\;\r %phones"
set fs4 "@speed 1200 putw ATH\r"
set fs5
@accept s1 "System name to call: "; queue add " call %s1"; queue list
set fs6
@lput "Queue Entries:\n"; queue list; echo "Working..."; queue run
if du goto unixs
if dv goto vmss
pz480 : set PST timezone
: port 2 : Possible default port if net set by env. DPORT=2
: ps8 :set C/G status line attribute to dim
: if dc pn3 ps4 pr97 :if RGB, cyan, red stat, blu/y rev video
: if dc ps11 pn14 pr30 :if RGB, y on bl, rev. blue on lt. bl. status
: display bell=visual
::: DO NOT USE BACKSLASHES FOR FILENAMES
: set calllog c:/tmp/calllog
: set rxlog c:/tmp/rxlog
: set txlog c:/tmp/txlog
set lib "c:/yam"
set tmp c:/tmp
set helpfile "@!yhp /yam/umanh.hlp main"
set f10 "@help"
goto setup2
unixs: set lib "/usr/lib/yam"
set tmp "/usr/spool/yam"
if f/usr/lib/yam/umanh.hlp set helpfile "@!yhp /usr/lib/yam/umanh.hlp main"
: port tty1A : A possible default port for Unix
if %helpfile set f10 "@help"
goto setup2
vmss:
if %helpfile set f4 "@help"
goto setup2
setup2:
: accept xpassword "\E[mMaster Password: \E[8m"; lput "\E[m"
set s0 ""
setc pho "%phones\&s"; if f%pho source %pho : find phones.ts file
if %f10 echo "Hit F10 for help"
if %s0 return
if !%MODEM set MODEM "mm224e.t"
echo "Initializing dialer script as %lib/%MODEM"
return
: Assumes drive c: and host directory c:/host
: Also assumes a c:/tmp directory host is used with DOS flavor only.
host echo " Entering Host Operation: MODEM=%MODEM"
set emdir c:/yam; set twxfile twx;
set disks "c" : Must be lower case
: set rcmdlog "c:/yam/rcmds" : Log of remotely entered commands
set dirrx "c:/tmp"
set callers c:/yam/callers
set welcome
@typ welcome.txt; lput "\E[2\07324r\E[2J\E[?6h%s9 %remote\n"; purgek
set f9
@lput "\E[2\07324r\E[2J\E[?6h%s9 %remote\n"
: set password Ritchie
set password "" : Don't ask for a password
set rxlog c:/host/rxlog : Log of received files
set txlog c:/yam/txlog : Log of transmitted files
set plog c:/yam/plog : Performance log
set unrestrict "Wrong" : Password used by unrestrict cmd
set xhelpfile c:/HOST/xyamhelp.t
set private c:/memo/private : Where private messages are stored
set messages c:/host/messages : Where public messages are stored
set answerback "\r\nUnedited phones.t\r\n\21"
set callpath c:/tmp/*.xx? : For outcall queue
: the next line causes checkrmt.t to check each host mode command
set rmtcheck "@if !irmtcmd,rz source C:/host/checkrmt.t"
set menu /host/menu.hst : menu for callers
: Example setting for "bbs" param. See manual chapter on Security
if !dX set bbs "~/l.com >com1"
c:
set home \HOST; cd : This must start with \
port 2; o : Turn off port 2
port 1; bye; speed 2400 : Initialize port 1
host2:
set outahost "@gosub outahost" : to turn off modem autoanswer
set baudstr "@gosub .%lib/baud2.t" : syncs to caller's speed
:: set baudstr "@gosub .%lib/baud4.t" : For certain modems
if !%challenge set challenge "@gosub .%lib/challeng.t"
set call1 "@bye;sleep 100;sp 1200;putw \5\r\336O111211311122\r\336I\r"
set call2 "@bye;sleep 100;sp 1200;putw \5\r\336O111111311122\r\336I\r"
if iMODEM,tb.t set call1 "@gosub call1"; set call2 "@gosub call2"
if iMODEM,hu96.t set call1 "@sp 1200; gosub waketb; putw ATM0H1\r"
if iMODEM,hu96.t set call2 "@sp 1200; gosub waketb; putw ATS0=1\r"
if iMODEM,fc.t set call1 "@sp 19200; gosub waketb; putw ATM0H1\r"
if iMODEM,fc.t set call2 "@sp 19200; gosub waketb; putw ATS0=1\r"
if pMODEM,mm set call1 "@gosub call1e"; set call2 "@gosub call2e"
if iMODEM,hst.t set call1 "@gosub call1h"; set call2 "@gosub call2h"
: set call3
: @echo "Now awaiting incoming calls. Press F1 to exit."
: The next two lines configure parameters for the link command
if "!dX&&!dD" px2; py19200; set linkpass "Giznoid";
if "!dX&&!dD" set outalink "@kill; put \r\4;o;port 1;bye"
zmodem pp15 pt30 : set faster timeouts
set exrc "@echo EXRC; handshake off; display nobell=visual novt"
display bell=visual : silence is golden
kermit pd0 : No delay on Kermit
pH180 : 180 seconds inactivity timeout
pS10 : 10 seconds flow control recovery
pk3 : dump circ buffer on ^C
host
:: Generate a script with TurboLearn Script Writer(TM)
tlearn set fc10 "" :: telephone number, and flag that telno was entered
if c echo "Already connected (Carrier Detect is ON)"; goto connected
cls
accept fc10 "Enter Telephone Number "
ag1: accept fa1 "Enter Speed (300, 1200, 2400, 19200, 38400) "
if ifa1,300 speed 300 goto ag2
if ifa1,2400 speed 2400 goto ag2
if ifa1,9600 speed 9600 goto ag2
if ifa1,19200 speed 19200 goto ag2
if ifa1,38400 speed 38400 goto ag2
echo "Bad speed"; goback ag1
ag2: lput "\r\n1 System uses IBM PC (ANSI) line drawing characters\r\n"
lput "2 System uses 7 bits even parity\r\n"
lput "3 System uses 8 bits No parity (8n1)\r\n"
lput "\r\n"
acceptl1 fa2 "Choose one of the above: "
lput "\r\n"
ena -8n
@%fc10
if !c echo "Sorry, no connection"; return
set fa5 ""
if ifa2,1 ena -8g; set fa5 "ena -8g"
if ifa2,2 ena -7e; set fa5 "ena -7e"
connected:
echo "Finish with F1. Use ALT-B to send a break if necessary"
learn -y tlrn.tmp
cn2: if !r echo "WARNING: Learning (recording) terminated prematurely!"
close
kill
create newscr.t
if !r abort
echo "Is this to become a Telephone Directory entry (y/n)?"
if !y goto nodir
accept fa6 "What directory entry name to use? "
echoc "%fa6 speed %fa1 %fc10 %fa5"
nodir: close; set fa2 ""
echo "Should the script disconnect the phone line (y/n) ?"
if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
set fa2 "bye; return"
echo "Should the script then exit to the Operating System (y/n)?"
if y set fa2 "off"
!tlearn -r tlrn.tmp >>newscr.t
create -+ newscr.t; echof " %fa2"; close
scdone: echo "Your new script is in the file 'newscr.t' !!"
if %fc10 echo "You may add this file to your Telephone Directory"
if %fc10 echo "Or execute it with 'call %fa6.newscr.t'"; return
echo "You may execute this file with 'source newscr.t'"
return
:: Display the colors generated by various numeric parameters
colors if !dd echo "For DOS flavors only"; abort
set s0 0; cls
p#255; p$5; cls; display noautowrap
while L<129 obey "pn%s0" lput "\E[m %s0 \r\n" setn s0 s0+1
pn130; p$80; p#24; lput "\E[10;H\E[m"
lput " For BLINKING add 128\r\n"
pn3; lput "\E[m"
lput " Pro-YAM Colors (*, @, n, r, s and u Numeric Parameters)\r\n"
return
*****************************************************************************
***** User Directory Entries are added below this line *****************
*****************************************************************************
omen-tech speed 1200 %l-503-621-3746 t
omen-tech speed 1200 621-3746 t
omen-voice %l-503-621-3406\;
echo " Type Shift-F4 to Disconnect "
status pe0 cls while !k lput \EH s
upgrade goto ug1
telegodzilla cls
ug1: echo "Demand Upgrade(TM): Omen Technology's TeleGodzilla system"
accept s7 "Please enter your LAST name: "; accept s6 "First name: "
speed 2400 %l-503-621-3746
display overstrike; cls; pat 1 "ease:"; wait -f20
if !1||!c echo "Access Failed"; o; fail
put "\b\b%s6 %s7\r"; pat 1 ect;wait -f2
put "y"; pat 1 "-Host"; wait -f9
if iremote,upgrade; zcommand "sz -n upgrade/yam.eqe upgrade/newest.meq upgrade/read.meq"
if iremote,upgrade; putw "bye\r"; off
t
vms speed 1200 %m-641-0000 display vt; set bs "\177"; t
:: Directory entry to bring up a SLIP connection
slip speed 38400 2275055/mnp
pat 0c "ogin:" "booslip\r"
pat 1c "word:" "KermitCroaks\r"
pat 2 "beginning"
wait -f10
if "!2" echo "So Sorry."; off
lput "\n\r"
!/usr/lib/yam/slip.sh start
return
:: Directory entry to take down the SLIP connection
unslip o
!/usr/lib/yam/slip.sh stop
off