home *** CD-ROM | disk | FTP | other *** search
- 10 REM *****************************
- 20 REM * PC PROMPTER *
- 30 REM * By Ken Hughes *
- 40 REM * (c) Database Publications *
- 50 REM *****************************
- 60 REM
- 70 CLS
- 80 REM getdrive:
- 90 WIDTH 80
- 100 COLOR 15,0
- 110 drv$=""
- 120 WHILE drv$=""
- 130 LOCATE 1,1
- 140 INPUT "Enter drive letter for textfile: ",drv$
- 150 WEND
- 160 IF right$(drv$,1)<>":" THEN drv$=drv$+":"
- 170 ON ERROR GOTO 1080
- 180 FILES drv$
- 190 ON ERROR GOTO 0
- 200 REM getfile:
- 210 PRINT
- 220 txtfile$=""
- 230 x=POS(i):y=CSRLIN
- 240 WHILE txtfile$=""
- 250 LOCATE y,x
- 260 INPUT "Enter name of text file: ",txtfile$
- 270 WEND
- 280 ON ERROR GOTO 1160
- 290 OPEN "I",1,drv$+txtfile$,1
- 300 CLOSE 1
- 310 ON ERROR GOTO 0
- 320 SCREEN 1
- 330 SCREEN 0
- 340 COLOR 14,0
- 350 CLS
- 360 COLOR 0,6
- 370 PRINT "Press the button when ready...";
- 380 COLOR 14,0
- 390 GOSUB 790
- 400 tim=INT(TIMER)
- 410 CLS
- 420 OPEN "I",1,drv$+txtfile$,1
- 430 WHILE NOT EOF (1)
- 440 LINE INPUT #1,a$
- 450 IF a$="" THEN PRINT:GOTO 620
- 460 FOR m%=1 TO len(a$)
- 470 IF MID$(a$,m%,1)="{" THEN GOSUB 980:GOTO 520
- 480 IF MID$(a$,m%,1)="}" THEN GOSUB 1030:GOTO 520
- 490 PRINT UCASE$(MID$(a$,m%,1));
- 500 GOSUB 1240
- 510 REM
- 520 REM delayloop:
- 530 FOR n%=1 TO 5
- 540 q$=INKEY$
- 550 IF q$=CHR$(0)+"P" THEN GOSUB 900
- 560 NEXT n%
- 570 NEXT m%
- 580 IF colflag=1 THEN COLOR 14,0
- 590 PRINT:PRINT
- 600 IF colflag=1 THEN COLOR 15,4
- 610 REM
- 620 REM bypass:
- 630 WEND
- 640 CLOSE #1
- 650 COLOR 0,6
- 660 PRINT "Press the Button...";
- 670 COLOR 14,0
- 680 PRINT
- 690 GOSUB 900
- 700 CLS
- 710 anymore$=""
- 720 WHILE UCASE$(anymore$)<>"Y" AND UCASE$(anymore$)<>"N"
- 730 LOCATE 1,1
- 740 INPUT "Another speech Y/N? ",anymore$
- 750 WEND
- 760 IF UCASE$(anymore$)="Y" THEN GOTO 80
- 770 END
- 780 REM
- 790 REM waitone:
- 800 q$=""
- 810 WHILE q$<>CHR$(0)+"P"
- 820 q$=INKEY$
- 830 LOCATE 25,1
- 840 COLOR 11,0
- 850 PRINT "Time "TIME$;
- 860 COLOR 14,0
- 870 WEND
- 880 RETURN
- 890 REM
- 900 REM waitfor:
- 910 q$=""
- 920 WHILE q$<>CHR$(0)+"P"
- 930 q$=INKEY$
- 940 GOSUB 1240
- 950 WEND
- 960 RETURN
- 970 REM
- 980 REM red:
- 990 colflag=1
- 1000 COLOR 15,4
- 1010 RETURN
- 1020 REM
- 1030 REM normal:
- 1040 colflag=0
- 1050 COLOR 14,0
- 1060 RETURN
- 1070 REM
- 1080 REM driveerror:
- 1090 PRINT "Drive ";drv$;" does not exist, press any key to reselect";CHR$(7);
- 1100 q$=""
- 1110 WHILE q$=""
- 1120 q$=INKEY$
- 1130 WEND
- 1140 RESUME 80
- 1150 REM
- 1160 REM fileerror:
- 1170 PRINT "File ";txtfile$;" does not exist, press any key to reselect";CHR$(7);
- 1180 q$=""
- 1190 WHILE q$=""
- 1200 q$=INKEY$
- 1210 WEND
- 1220 RESUME 200
- 1230 REM
- 1240 REM gettime:
- 1250 timdel=INT(TIMER)-tim
- 1260 m=INT(timdel/60)
- 1270 m$=STR$(m)
- 1280 h=INT(timdel/3600)
- 1290 h$=STR$(h)
- 1300 s=INT(timdel-(m*60)-(h*3600))
- 1310 s$=STR$(s)
- 1320 x=POS(I):y=CSRLIN
- 1330 LOCATE 25,1
- 1340 COLOR 15,0
- 1350 PRINT "Elapsed time: ";
- 1360 IF h<10 THEN PRINT "0";
- 1370 PRINT MID$(h$,2);":";
- 1380 IF m<10 THEN PRINT "0";
- 1390 PRINT MID$(m$,2);":";
- 1400 IF s<10 THEN PRINT "0";
- 1410 PRINT MID$(s$,2);
- 1420 m1=m
- 1430 IF colflag=0 THEN COLOR 14,0 ELSE COLOR 15,4
- 1440 IF y=25 THEN y=y-1
- 1450 LOCATE y,x
- 1460 RETURN
-
-