home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR4
/
PCMPROGA.ZIP
/
ONEKEY.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-07-01
|
5KB
|
90 lines
10 DIM KEYS(60), COMMANDS(30,102)
20 FOR I=1 TO 10:KEY I,"":NEXT I:CLS:KINDEX=1:CINDEX=1
200 FOR I=1 TO 30
220 LOCATE 10,15:PRINT" Type the key to be replaced."
230 LOCATE 11,15:PRINT"(Use Control End if there are no more keys)."
240 DEF SEG = &H40
250 FKEY$=INKEY$:IF FKEY$="" GOTO 250
260 LOCATE 10,15:PRINT SPC(50):LOCATE 11,15:PRINT SPC(50)
280 TAIL=PEEK(26):TAIL=TAIL-2:IF TAIL < 30 THEN TAIL = 60
310 CODE1=PEEK(TAIL):CODE2=PEEK(TAIL+1)
340 IF CODE1=0 AND CODE2=117 THEN GOTO 860
350 KEYS(KINDEX) = CODE1:KEYS(KINDEX+1) = CODE2:KINDEX = KINDEX+2
390 LOCATE 11,23:PRINT"The command that replaces this key is:"
400 LOCATE 12,23:PRINT" (Use Control End when done)."
410 LOCATE 13,17:PRINT CHR$(218);:FOR IND=1 TO 50:PRINT CHR$(196);
411 NEXT IND:PRINT CHR$(191)
420 LOCATE 15,17:PRINT CHR$(192);:FOR IND=1 TO 50:PRINT CHR$(196);
421 NEXT IND:PRINT CHR$(217)
430 LOCATE 14,17:PRINT CHR$(179);:GOSUB 1070:PLACE=19:LOCATE 14,18
460 FOR J=1 TO 100 STEP 2
470 PLACE=PLACE+1
490 FKEY$=INKEY$:IF FKEY$="" GOTO 490
500 TAIL=PEEK(26):TAIL=TAIL-2:IF TAIL < 30 THEN TAIL = 60 ELSE GOTO 530
530 CODE1=PEEK(TAIL):CODE2=PEEK(TAIL+1)
550 IF CODE1=0 AND CODE2=117 THEN GOTO 650
560 IF CODE1=13 AND CODE2=28 THEN FKEY$="/"
570 IF CODE1<>8 OR CODE2<>14 THEN GOTO 610
580 IF J <=1 GOTO 490
590 J=J-2:COMMANDS(I,J)=0:COMMANDS(I,J+1)=0:PLACE=PLACE-2:LOCATE 14,PLACE-1
600 PRINT SPC(1);:GOSUB 1070:LOCATE 14,PLACE-1:GOTO 470
610 COMMANDS(I,J)=CODE1:COMMANDS(I,J+1)=CODE2:PRINT FKEY$;:GOSUB 1070:NEXT J
650 FOR EIO = 11 TO 15:LOCATE EIO,15:PRINT SPC(70):NEXT EIO:NEXT I:DEF SEG
860 OPEN "ONEKEY.COM" AS # 1 LEN = 1 'Open Onekey.com
870 LOCATE 2,30:PRINT" Creating ONEKEY.COM "
880 FIELD #1,1 AS BYTE.$:FOR N = 1 TO 406
900 READ BYTE.%:IF BYTE.% <> -1 THEN GOTO 940
920 FOR III=1 TO 60:LSET BYTE.$=CHR$(KEYS(III)):PUT #1:NEXT III:GOTO 1020
940 IF BYTE.% <> -2 THEN GOTO 1010
950 FOR II=1 TO 30:FOR JJ=1 TO 102
960 LSET BYTE.$=CHR$(COMMANDS(II,JJ)):PUT #1
970 NEXT JJ:NEXT II:GOTO 1020
1010 LSET BYTE.$ = CHR$(BYTE.%):PUT #1
1020 NEXT N:CLOSE #1
1050 LOCATE 19,15:PRINT SPC(10) " ONEKEY.COM Created. "
1060 END
1070 Y=CSRLIN:X=POS(0):LOCATE 14,67:PRINT SPC(1) CHR$(179) SPC(1);
1080 LOCATE Y,X:RETURN
2010 DATA 233, 116, 13, 40, 67, 41, 32, 49, 57, 56
2020 DATA 52, 32, 83, 46, 32, 72, 111, 108, 122, 110
2030 DATA 101, 114, -1, 1, -2, 1, 0, 1, 0, 0
2040 DATA 0, 1, 0, 0, 0, 30, 86, 87, 82, 81
2050 DATA 83, 80, 156, 46, 255, 30, 73, 13, 184, 64
2060 DATA 0, 142, 216, 139, 30, 28, 0, 59, 30, 26
2070 DATA 0, 117, 3, 233, 140, 0, 131, 235, 2, 131
2080 DATA 251, 30, 115, 6, 187, 62, 0, 131, 235, 2
2090 DATA 139, 7, 46, 128, 62, 82, 1, 1, 116, 3
2100 DATA 235, 114, 144, 46, 198, 6, 82, 1, 1, 46
2110 DATA 141, 54, 22, 1, 185, 30, 0, 46, 59, 4
2120 DATA 116, 8, 131, 198, 2, 226, 246, 235, 87, 144
2130 DATA 250, 46, 141, 54, 83, 1, 247, 217, 131, 193
2140 DATA 30, 139, 193, 185, 102, 0, 246, 225, 3, 240
2150 DATA 46, 137, 54, 71, 13, 46, 139, 4, 131, 198
2160 DATA 2, 61, 0, 0, 116, 50, 139, 211, 131, 194
2170 DATA 2, 131, 250, 62, 124, 3, 186, 30, 0, 59
2180 DATA 22, 26, 0, 116, 25, 46, 131, 6, 71, 13
2190 DATA 2, 137, 7, 131, 195, 2, 131, 251, 62, 124
2200 DATA 3, 187, 30, 0, 137, 30, 28, 0, 235, 201
2210 DATA 46, 198, 6, 82, 1, 0, 88, 91, 89, 90
2220 DATA 95, 94, 31, 251, 207, 156, 30, 14, 31, 255
2230 DATA 30, 77, 13, 156, 128, 62, 82, 1, 1, 116
2240 DATA 95, 250, 30, 86, 82, 83, 80, 184, 64, 0
2250 DATA 142, 216, 139, 30, 28, 0, 46, 198, 6, 82
2260 DATA 1, 1, 46, 139, 54, 71, 13, 46, 139, 4
2270 DATA 131, 198, 2, 61, 0, 0, 117, 3, 235, 51
2280 DATA 144, 139, 211, 131, 194, 2, 131, 250, 62, 124
2290 DATA 3, 186, 30, 0, 59, 22, 26, 0, 116, 25
2300 DATA 46, 131, 6, 71, 13, 2, 137, 7, 131, 195
2310 DATA 2, 131, 251, 62, 124, 3, 187, 30, 0, 137
2320 DATA 30, 28, 0, 235, 198, 46, 198, 6, 82, 1
2330 DATA 0, 88, 91, 90, 94, 31, 157, 31, 207, 30
2340 DATA 184, 0, 0, 142, 216, 250, 161, 36, 0, 46
2350 DATA 163, 73, 13, 161, 38, 0, 46, 163, 75, 13
2360 DATA 199, 6, 36, 0, 81, 13, 140, 14, 38, 0
2370 DATA 161, 112, 0, 46, 163, 77, 13, 161, 114, 0
2380 DATA 46, 163, 79, 13, 199, 6, 112, 0, 5, 14
2390 DATA 140, 14, 114, 0, 251, 184, 64, 0, 142, 216
2400 DATA 187, 30, 0, 137, 30, 26, 0, 137, 30, 28
2410 DATA 0, 186, 119, 14, 205, 39