home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Bila Vrana
/
BILA_VRANA.iso
/
021A
/
MENUV1_1.ZIP
/
MENU.BAS
next >
Wrap
BASIC Source File
|
1996-08-10
|
2KB
|
64 lines
DIM select$(9), directory$(9), filename$(9)
OPEN "i", 1, "c:\menu.inf"
INPUT #1, i$
IF i$ <> "Listed below should be 30 lines: Program Name; Program Working Directory; Program Command Line... repeated 10X." THEN CLOSE : PRINT "MENU.INF is not in correct format.": END
FOR i = 0 TO 9
INPUT #1, select$(i)
select$(i) = LEFT$(select$(i), 18) + STRING$(18 - LEN(select$(i)), 32)
INPUT #1, directory$(i)
INPUT #1, filename$(i)
NEXT
CLOSE
PRINT
COLOR 7, 0
PRINT TAB(18); CHR$(201); STRING$(20, 205); CHR$(209); STRING$(20, 205); CHR$(187)
PRINT TAB(18); CHR$(186); " Date : ";
COLOR 15: PRINT DATE$;
COLOR 7: PRINT " "; CHR$(179); " Time : "; TIME$; " "; CHR$(186)
PRINT TAB(18); CHR$(199); STRING$(20, 196); CHR$(197); STRING$(20, 196); CHR$(182)
FOR i = 0 TO 4
PRINT TAB(18); CHR$(186); " "; select$(i); " "; CHR$(179); " "; select$(i + 5); " "; CHR$(186)
NEXT
PRINT TAB(18); CHR$(199); STRING$(20, 196); CHR$(193); STRING$(20, 196); CHR$(182)
PRINT TAB(18); CHR$(186);
COLOR 1: PRINT " Press 's' to select down, 'S' for up. ";
COLOR 7: PRINT CHR$(186)
PRINT TAB(18); CHR$(200); STRING$(41, 205); CHR$(188)
marker = CSRLIN
position = 0
GOSUB update
done = 0
WHILE NOT done
i$ = INKEY$
IF i$ = CHR$(13) THEN done = -1
IF i$ = "s" THEN position = position + 1: GOSUB update
IF i$ = "S" THEN position = position - 1: GOSUB update
COLOR 15: LOCATE marker - 10, 48: PRINT TIME$
WEND
OPEN "o", 1, "c:\select.bat"
PRINT #1, "@echo off"
PRINT #1, "cd " + directory$(position)
PRINT #1, filename$(position)
CLOSE #1
LOCATE marker
COLOR 7, 0
END
update:
IF position = 10 THEN position = 0
IF position = -1 THEN position = 9
LOCATE marker - 8
FOR i = 0 TO 4
IF position = i THEN COLOR 7, 1 ELSE COLOR 7, 0
LOCATE CSRLIN, 20: PRINT select$(i)
NEXT
LOCATE marker - 8
FOR i = 5 TO 9
IF position = i THEN COLOR 7, 1 ELSE COLOR 7, 0
LOCATE CSRLIN, 41: PRINT select$(i)
NEXT
COLOR 7, 0
RETURN