home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
ftp.demon.co.uk-pub-cpm
/
logmake3.com
/
LOGMAKER.BAS
next >
Wrap
BASIC Source File
|
1979-11-30
|
5KB
|
131 lines
1 ' +------------------------------+
2 ' | |
3 ' | Log Maker |
4 ' | |
5 ' | v3.0 |
6 ' | |
7 ' | September 7, 1991 |
8 ' | |
9 ' | John Curtis |
10 ' | |
11 ' +------------------------------+
12 '
13 '
14 ON ERROR GOTO 118
15 GOTO 71
16 PRINT:PRINT:PRINT "-> Log Maker <- v3.0 September 7, 1991 John Curtis":PRINT
17 PRINT "BBS Name -> ";BBS$
18 PRINT "Filename -> ";NME$
19 PRINT "Phone Number -> ";NMB$
20 PRINT:PRINT
21 PRINT "Is this okay? ";
22 Y$=INKEY$:IF Y$="" THEN 22
23 IF Y$="Y" OR Y$="y" THEN PRINT "Yes.":GOTO 25
24 PRINT "No.":END
25 'WRITE SCRIPT **********************
26 OPEN "O",#1,NME$
27 PRINT #1, "!& m 0"
28 PRINT #1, "!& o 0"
29 PRINT #1, "!b 2400"
30 PRINT #1, "!> \r\n\n"
31 PRINT #1, "!> A 'Log Maker' chat script!\r\n\n"
32 PRINT #1, "!> Dialing -> "+BBS$+" <-\r\n\n"
33 PRINT #1, "-at\r-OK\r\n-5-5-"
34 PRINT #1, "!: again"
35 PRINT #1, "-atdt"+NMB$+"\r--"
36 PRINT #1, "![ - 30 .2400.1200.300.BUSY"
37 PRINT #1, "![ = 2400 `2400"
38 PRINT #1, "![ = 1200 `1200"
39 PRINT #1, "![ = 300 `300"
40 PRINT #1, "![ = NO `NO"
41 PRINT #1, "!# a = a `again"
42 PRINT #1, "!: 2400"
43 PRINT #1, "!b 2400"
44 PRINT #1, "!# a = a `ready"
45 PRINT #1, "!: 1200"
46 PRINT #1, "!b 1200"
47 PRINT #1, "!# a = a `ready"
48 PRINT #1, "!: 300"
49 PRINT #1, "!b 300"
50 PRINT #1, "!# a = a `ready"
51 PRINT #1, "!: NO"
52 PRINT #1, "!> Abort! \7No activity at "+NMB$+"\r\n\n"
53 PRINT #1, "---"
54 PRINT #1, "!: ready"
55 PRINT #1, "!& o 1"
56 PRINT #1, "!> Connection!\7\r\n\n"
57 PRINT:PRINT "Dialing sequence installed.":PRINT
58 PRINT "Would you like to add to the basic script? ";
59 Y$=INKEY$:IF Y$="" THEN 59
60 IF Y$="N" OR Y$="n" THEN PRINT "No.":PRINT #1, "---":CLOSE #1:END
61 PRINT "Yes."
62 PRINT:PRINT "'@' if you want a NULL string and"
63 PRINT "'\r' for additional 'returns'.":INPUT "String to SEND: ";SND$
64 INPUT "EXPECT string: ";EXP$
65 IF SND$="@" THEN SND$="":PRINT #1, "--"+EXP$+"-":GOTO 69
66 IF SND$="\r" OR SND$="\r\r" OR SND$="\r\r\r" OR SND$="\r\r\r\r" THEN PRINT #1, "-"+SND$+"-"+EXP$+"-":GOTO 69
67 IF EXP$="@" THEN EXP$=""
68 PRINT #1, "-"+SND$+"\r-"+EXP$+"-"
69 PRINT "Add more? ";
70 GOTO 59
71 PRINT
72 A=&H7F
73 A=A+&H1
74 B=PEEK(A)
75 IF B THEN A=A+&H1:GOTO 77
76 GOTO 100 ' ************ NO COMMAND LINE PRESENT
77 A=A+&H1
78 B=PEEK(A)
79 IF B THEN CMM$=CMM$+CHR$(B):GOTO 77
80 ' ************ THE COMMAND IS IN CMM$
81 L=LEN(CMM$)
82 FOR T=1 TO L
83 T$=MID$(CMM$,T,1)
84 IF T$=" " THEN NTWO=1:T$=""
85 IF T<5 THEN NME$=NME$+T$
86 IF NTWO=1 AND T$="-" THEN T$=""
87 IF NTWO=1 THEN NMB$=NMB$+T$:GOTO 89
88 BBS$=BBS$+T$
89 NEXT T
90 L=LEN(NMB$)
91 IF L=0 THEN TMCH$="*** The phonenumber field was empty."+CHR$(7):GOTO 100
92 FOR T=1 TO L
93 T$=MID$(NMB$,T,1)
94 IF T$="*" THEN GOTO 96
95 IF T$<"0" OR T$>"9" THEN TMCH$="*** The character '"+T$+"' is unacceptable in the phonenumber field."+CHR$(7):GOTO 100
96 NEXT T
97 OPEN "I",#1,NME$
98 CLOSE #1
99 GOTO 125
100 '
101 PRINT:PRINT:PRINT:PRINT "-> Log Maker <- v3.0 September 7, 1991 John Curtis"
102 PRINT
103 PRINT "Purpose: This program will produce a 'chat script' to be used with"
104 PRINT " the telecommunication program QTERM and any modem using"
105 PRINT " the 'AT' command set."
106 PRINT
107 PRINT "Syntax: LOGMAKER bbsname phonenumber"
108 PRINT " -the bbsname must not contain spaces."
109 PRINT " -the name of the 'chat script' will be dirived from"
110 PRINT " the first four characters of the bbsname so take"
111 PRINT " care not to use 'illegal' characters in these "
112 PRINT " positions."
113 PRINT " -the phonenumber may be entered in the forms"
114 PRINT " 555-1212 or 5551212."
115 PRINT " -if you have call waiting and would like to disable"
116 PRINT " it preceed the phonenumber with *70."
117 PRINT:PRINT TMCH$:END
118 '
119 CLOSE #1
120 IF ERR=61 OR ERR=67 THEN TMCH$="This disk is full!! Correct this situation before running this program."+CHR$(7):CLOSE #1:RESUME 100
121 IF ERR=64 THEN TMCH$="'"+NME$+"' is unacceptable as a filename."+CHR$(7):CLOSE #1:RESUME 100
122 IF ERR=57 THEN TMCH$="A disk I/O error has occured.":CLOSE #1:RESUME 100
123 IF ERR=53 THEN RESUME 16
124 PRINT:PRINT "Error ";ERR;" at line ";ERL:END
125 '
126 PRINT:PRINT "A file with the name "+NME$+" already exists. "
127 PRINT "Do you want to write over it?";
128 Y$=INKEY$:IF Y$="" THEN 128
129 IF Y$="Y" OR Y$="y" THEN PRINT " Yes.":GOTO 16
130 PRINT " No.":END