BBS: Inland Empire Archive Date: 06-30-92 (08:22) Number: 1830 From: RAY CARSON Refer#: NONE To: BILL CAMPBELL Recvd: NO Subj: TagMenu Conf: (2) Quik_Bas
BC> Great code, Ray. Was most impressed. Now I'm just trying to work
BC> out how to jump to Array$(x) when a pressed key matches the first
BC> character of Array$(x). Being your menu I thought I'd ask you for
BC> a route to go to accomplish this. Your thoughts?
I can work it out but it might take a couple of days, I seem to have
more projects than I have time for. The first thing that you will
have to do is change the INKEY$ routine. Change the Keycode to negative
values for extended keys by changing the values of 60, 61, 71, 79,
80, and 72 and the statement under GetKey.
IF LEN(k$) = 2 THEN Keycode = -ASC(RIGHT$(k$, 1))
IF Keycode = -60 THEN 'F2
IF Keycode = -61 THEN 'F3
IF Keycode = -71 THEN 'Home
IF Keycode = -79 THEN 'End
IF Keycode = -80 OR Keycode = 32 THEN 'Down
IF Keycode = -72 THEN 'Up
The routine you are talking about should be added before the last line
in the SUB, "GOTO GetKey". First check for a valid key and then for
a match with an Array$() Item.
IF UCASE$(k$) >= "A" AND UCASE$(k$) <= "Z" THEN
Match = 0
FOR Q = X TO N
IF k$ = LEFT$(Array$(Q), 1) THEN
Match = -1
EXIT FOR
END IF
NEXT
IF Match = 0 THEN
FOR Q = 1 TO X
IF k$ = LEFT$(Array$(Q), 1) THEN
Match = -1
EXIT FOR
END IF
NEXT
END IF
IF Match THEN
'the display part would go here but I don't have it
'perfected yet. This is what I have started but is
'not complete.
COLOR FgNormal, BgNormal
Row = UpperRow
X = 1
DO
LOCATE Row, Column
PRINT " " + Array$(X) + SPACE$(MaxLength - LEN(Array$(X)))_
+ " ";
RowI = Row
GOSUB CheckTagged
IF X = Q THEN
EXIT DO
END IF
Row = Row + 1
IF Row = LowerRow + 1 THEN
Row = UpperRow
END IF
X = X + 1
LOOP UNTIL X > N
X = Q
COLOR FgHlight, BgHlight
LOCATE Row, Column
PRINT " " + Array$(X) + SPACE$(MaxLength - LEN(Array$(X))) + " ";
END IF
END IF
If you get it worked out before I do then let me know else I will be
working on it as time permits.
Ray Carson
--- T.A.G. 2.6c1 Standard
* Origin: CSI Online - TagScan Alpha Site 2! (1:106/3198)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET