home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progbas
/
managr02.arj
/
MANAGER.ASI
< prev
next >
Wrap
Text File
|
1992-01-22
|
53KB
|
2,967 lines
rem MANAGER.COM
rem consecutive to wait22:
rem initialize Esc key. This is necessary because some parameters go directly
rem to a routine; if it wasn't initialized here, it would have to be re-
rem initialized in every routine in which it was used. CHR$(27) is the ASCII
rem code for the Esc key.
b$=chr$(27)
rem initialize Enter (Return) key. Same reason as the Esc key initialization,
rem but applies mainly to the error routines. CHR$(13) is the ASCII code for
rem the Enter (Return) key.
c$=chr$(13)
rem Again, for the error routines, initialize the Backspace key and space bar.
d$=chr$(8)
e$=chr$(32)
lf$=chr$(10)
crlf$=c$+lf$
rem a=csrline (this is reserved in the subroutine CURSOR:)
rem b=pos(0) (also reserved in CURSOR: subroutine)
rem c=b-1 (reserved in CURSOR: subroutine)
rem This program requires approximately 68K of RAM.
rem Now, check for parameters. The first set is for 80-column mode.
a$=command$
if a$=" /?" then help:
if a$=" /d" then killfile:
if a$=" /D" then killfile:
if a$=" /m" then makedir:
if a$=" /M" then makedir:
if a$=" /n" then renfile:
if a$=" /N" then renfile:
if a$=" /g" then timedate:
if a$=" /G" then timedate:
if a$=" /b" then
gosub blankscr:
goto menu:
endif
if a$=" /B" then
gosub blankscr:
goto menu:
endif
if a$=" /p" then chckgrph:
if a$=" /P" then chckgrph:
if a$=" /s" then
call ("seefiles.com","")
goto menu:
endif
if a$=" /S" then
call ("seefiles.com","")
goto menu:
endif
if a$=" /v" then readfile:
if a$=" /V" then readfile:
if a$=" /l" then printfil:
if a$=" /L" then printfil:
rem This set of parameters is for 40-column mode.
if a$=" /40" then menu40:
if a$=" /40 ?" then help40:
if a$=" /40 d" then killfl40:
if a$=" /40 D" then killfl40:
if a$=" /40 m" then makedr40:
if a$=" /40 M" then makedr40:
if a$=" /40 n" then renfil40:
if a$=" /40 N" then renfil40:
if a$=" /40 g" then timedt40:
if a$=" /40 G" then timedt40:
if a$=" /40 b" then
gosub blankscr:
goto menu40:
endif
if a$=" /40 B" then
gosub blankscr:
goto menu40:
endif
if a$=" /40 s" then
call ("seefiles.com","/40")
goto menu40:
endif
if a$=" /40 S" then
call ("seefiles.com","/40")
goto menu40:
endif
if a$=" /40 l" then prfile40:
if a$=" /40 L" then prfile40:
rem If no parameters, begin from the beginning.
rem Set up and print intro screen.
cls
print " The Manager 2.02"
print
print
print " By Matt Roberts"
print " 5 Cedar St., #8"
print " Montpelier, Vt 05602-3006"
print " (802)223-2553"
print
print
print " If you find the programs on this disk useful, a donation of"
print " $5.00 would be greatly appreciated. Thanks."
print
print
print " If you're having trouble using this program, you can call"
print " between 9AM and 9PM (EST), and I'll try to help."
print
print
print
print
print
print
print
print "Press any key to continue. ";
gosub continue:
rem Intro screen is now printed.
rem Now direct the program to create a menu of options.
rem Here is the menu of options.
menu:
cls
print " Your Options"
print
print
print "F1- View File Lists. F10- Work with CONFIG.SYS."
print
print "F2- Read Files. <Alt-F1>- Work with AUTOEXEC.BAT."
print
print "F3- Print Files. <Alt-F2>- Make Directory."
print
print "F4- Copy Files. <Alt-F3>- Remove Directory."
print
print "F5- Move Files. <Alt-F4>- Blank Screen."
print
print "F6- Rename Files. <Alt-F5>- Check for Graphics Card."
print
print "F7- Delete Files. <Alt-F6>- Get Time and/or Date."
print
print "F8- Run Other Programs. N- Next Menu."
print
print "F9- Shell to DOS. Esc- Quit and Return to DOS."
print
print
print "Please press the key corresponding to your choice. ";
wait2:
gosub continue:
if a$=b$ then
cls
end
endif
if a$="n" then menu2:
if a$="N" then menu2:
if extended=0 then wait2:
if a$=";" then
call ("seefiles.com","")
endif
if a$="<" then readfile:
if a$="=" then printfil:
if a$=">" then copyfile:
if a$="?" then movefile:
if a$="@" then renfile:
if a$="A" then killfile:
if a$="B" then runother:
if a$="C" then shelldos:
if a$="D" then
call ("config.exe","")
goto menu:
endif
if a$="h" then
call ("autoexec.exe","")
goto menu:
endif
if a$="i" then makedir:
if a$="j" then removedr:
if a$="k" then
gosub blankscr:
goto menu:
endif
if a$="l" then chckgrph:
if a$="m" then timedate:
goto wait2:
menu2:
cls
print " More Options"
print
print
print "<Alt-F7>- See a list of DOS parameters you can use with The Manager."
print
print "<Alt-F8>- Change to 40-column mode (large text for visually impaired)."
print
print "F- First Menu."
print
print "Esc- Quit and Return to DOS."
print
print
print "Please press the key corresponding to your choice. ";
gosub continue:
wait:
if a$=b$ then
cls
end
endif
if a$="f" then menu:
if a$="F" then menu:
if extended=0 then wait:
if a$="n" then help:
if a$="o" then menu40:
goto wait:
rem Here is the routine for deleting files.
killfile:
cls
print " Delete Files"
print
print
print "Before going any further, you should be aware that, once a file has"
print "been deleted, it is very difficult to retrieve it. From this program,"
print "it is impossible; I lack the skill to make an undelete feature"
print "available."
print
print
print "Press any key to continue, or Esc to quit. ";
wait4:
gosub continue:
if a$=b$ then menu:
deletagn:
cls
print " Delete Files"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "File to delete? ";
gosub retypefi:
print ""
print ""
print ""
print "All the data in ";
print realfile$;
print " will be destroyed."
print
print
print "Press any key to continue, or Esc to quit. ";
wait5:
gosub continue:
if a$=b$ then menu:
rekill:
kill file$
if error=2 then nofilekf:
if error=5 then illeglkf:
print ""
print ""
print realfile$;
print " has been deleted."
file$=""
print
print "Delete another? (y/n) ";
wait6:
gosub continue:
if a$="y" then deletagn:
if a$="Y" then deletagn:
if a$="n" then menu:
if a$="N" then menu:
goto wait6:
rem This is the end of the routine for deleting files.
rem Here is the routine for making a directory.
makedir:
cls
print " Make a Directory"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Type directory name (include drive and path). ";
gosub retypefi:
directory$=file$
remakedr:
mkdir directory$
if error=3 then nopathmd:
if error=5 then illeglmd:
print ""
print ""
realdir$=ucase$(directory$)
print "You have created directory: ";
print realdir$
directory$=""
print
print
print "Would you like to make another directory? (y/n) ";
wait7:
gosub continue:
if a$="y" then makedir:
if a$="Y" then makedir:
if a$="n" then menu:
if a$="N" then menu:
goto wait7:
rem This is the end of the routine for making directories.
rem Here is the routine for renaming files.
renfile:
cls
print " Rename Files"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Name of file to change (include drive and path)? ";
gosub retypefi:
file1$=file$
realfile1$=ucase$(file1$)
dofile2:
print ""
print ""
print ""
print "New name for ";
print realfil1$;
print "? ";
file$=""
gosub retypefi:
file2$=file$
realfil2$=ucase$(file2$)
refile:
name file1$ as file2$
if error=2 then nofilerf:
if error=3 then nopathrf:
if error=5 then illeglrf:
if error=17 then diffdrrf:
print ""
print ""
print realfil1$;
print " has been renamed ";
print realfil2$;
print "."
file1$=""
file2$=""
print
print "Rename another? (y/n) ";
wait8:
gosub continue:
if a$="y" then renfile:
if a$="Y" then renfile:
if a$="n" then menu:
if a$="N" then menu:
goto wait8:
rem This is the end of the routine for renaming files.
rem Here is the routine for getting the time and/or date.
timedate:
cls
print " Get Time and/or Date."
print
print
print "Here are your options:"
print
print
print "F1- Get the time."
print
print "F2- Get the date."
print
print "F3- Get Both."
print
print "Esc- Return to the Main Options Menu."
print
print
print
print "Please press the key corresponding to your choice. ";
wait20:
gosub continue:
if a$=b$ then menu:
if extended=0 then wait20:
if a$=";" then gettime:
if a$="<" then getdate:
if a$="=" then getboth:
goto wait20:
gettime:
cls
print " Get the Time."
print
print
print "In order for this feature to work, the time in your computer must be"
print "set properly, either manually or with the Real-Time-Clock."
print
print
print
print
print
a$=time$
f$=mid$(a$,1,2)
d=val(f$)
if d>12 then
d=d-12
h$=" PM"
else
h$=" AM"
endif
if d=12 then
h$=" PM"
endif
e=d
g$=str$(e)
i$=mid$(a$,3,6)
j$=g$+i$
k$=ltrim$(j$)
print "The time is now: ";
print k$;
print h$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedate:
getdate:
cls
print " Get the Date"
print
print
print "In order for this feature to work properly, the date in your computer"
print "must be set properly. If it isn't, you may get a weird date."
print
print
print
print
print
a$=date$
print "Today's date is ";
print a$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedate:
getboth:
cls
print " Get Both"
print
print
print "In order for this feature to work, both your time and date must be set"
print "properly. If they aren't, you may get some weird answers. If you"
print "have problems, check your manual to find out how to set the time and"
print "date from DOS."
print
print
print
print
print
a$=time$
f$=mid$(a$,1,2)
d=val(f$)
if d>12 then
d=d-12
h$=" PM"
else
h$=" AM"
endif
if d=12 then
h$=" PM"
endif
e=d
g$=str$(e)
i$=mid$(a$,3,6)
j$=g$+i$
k$=ltrim$(j$)
print "The time is now: ";
print k$;
print h$
print
print
f$=date$
print "Today's date is ";
print f$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedate:
rem This is the end of the routine for getting the time and/or date.
rem Here is the routine for shelling to DOS.
shelldos:
cls
print " Shell to DOS"
print
print
print "On which drive is your COMMAND.COM (don't type the colon)? ";
wait9:
gosub continue:
print a$
path$=a$+":\command.com"
cls
print "Use the DOS command EXIT to return to The Manager."
print
call path$,""
if error=255 then nocall:
goto menu:
rem This is the end of the routine for shelling to DOS.
rem Here is the routine for blanking your screen.
blankscr:
cls
locate 81,81
gosub continue:
return
rem This is the end of the routine for blanking your screen.
rem Here is the routine for checking for a graphics card.
chckgrph:
cls
print " Check for a Graphics Adaptor"
print
print
print "This program only has the ability to check whether or not you have a"
print "graphics adapter. It can't tell you what kind of adapter you have"
print "at this time."
print
print
print
d=zmode
if d=1 then graphics: else nogrphcs:
graphics:
print "You have a graphics adapter installed."
print
print
print "Press any key to continue. ";
gosub continue:
goto menu:
nogrphcs:
print "There is no graphics adapter installed. However, you may be able to"
print "access special line-drawing characters for making menus, as well as"
print "some other characters (such as smiley faces). Check your DOS or word"
print "processing manual for details."
print
print
print "Press any key to continue. ";
gosub continue:
goto menu:
rem This is the end of the routine for checking for a graphics card.
rem Here are the screens for accessing MANAGER from DOS with parameters
rem (80 columns).
help:
cls
print "You can use arguments with The Manager if you wish; they may help"
print "save you time."
print
print
print "Just typing MANAGER at the DOS prompt will start The Manager from"
print "the beginning; you can choose your options from the menu."
print
print "Typing MANAGER /? gives you this help screen."
print
print "Typing MANAGER /d moves you directly to the Delete Files option."
print
print "Typing MANAGER /m moves you directly to the Make Directory option."
print
print "Typing MANAGER /n moves you directly to the Rename Files option."
print
print "Typing MANAGER /g moves you directly to the Get Date option."
print
print "Typing MANAGER /b blanks your screen."
print
print "Typing MANAGER /p checks for a graphics adaptor."
print
print
print "Press any key to continue. ";
gosub continue:
cls
print "Typing MANAGER /s lets you see a list of disk files."
print
print "Typing MANAGER /v lets you view the text file of your choice, on the"
print "screen."
print
print "Typing MANAGER /l lets you print a file on the lineprinter."
print
print
print "Upper or lower case makes no difference."
print
print
print "Do you want to ";
color 0,15
print "C";
color 7,0
print "ontinue with The Manager or Return to ";
color 0,15
print "D";
color 7,0
print "OS? ";
print
print
print "Please press the key corresponding to your choice. ";
wait11:
gosub continue:
if a$="c" then menu:
if a$="C" then menu:
if a$="d" then
cls
end
endif
if a$="D" then
cls
end
endif
goto wait11:
rem This is the end of the routine for the list of DOS parameters.
rem Here is the routine for reading a file.
readfile:
cls
print " Read a File"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Please type the name of the file you want to read."
print "Include drive and path. ";
gosub retypefi:
print ""
print ""
print "To pause the scrolling, press the space bar. To quit, press Esc."
print
print
print "While the file should be readable, formatting may not be quite"
print "correct."
print
print
print "Press any key to continue. ";
gosub continue:
a$=""
cls
reread:
open "i",1,file$
if error=2 then
gosub nofilerd:
goto reread:
endif
if error=3 then nopathrd:
readmore:
input# 1, line$ crlf
if error=96 then
print line$
line=line+1
if line=23 then
print "Press any key to continue. ";
gosub continue:
print
print
line=0
cls
endif
gosub blanklnr:
endif
line=line+1
if line=23 then
print ""
print "Press any key to continue. ";
gosub continue:
print
print
if a$=b$ then
line=0
file$=""
close 1
print
print
print "Do you want to view another file? (y/n) ";
goto wait56:
endif
line=0
cls
endif
print line$
a$=inkey$
if a$=e$ then
print "Press any key to continue. ";
gosub continue:
print
print
endif
if a$=b$ then
file$=""
line=0
close 1
print
print
print "Do you want to view another file? (y/n) ";
goto wait56:
endif
if error=99 then eof:
goto readmore:
blanklnr:
input# 1, line$ crlf
if line$="" then readmore:
return
eof:
print line$
print "Press any key to continue. ";
gosub continue:
print
print
line=0
file$=""
close 1
print
print
print "Do you want to view another file? (y/n) ";
wait56:
gosub continue:
if a$="y" then readfile:
if a$="Y" then readfile:
if a$="n" then menu:
if a$="N" then menu:
goto wait56:
rem This is the end of the routine for reading text files.
rem Here is the routine for printing text files.
printfil:
cls
print " Print a File"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Please type the name of the file you want to print."
print
print "Include the drive and path. ";
gosub retypefi:
doprintf:
f$=chr$(12)
open "i",1,file$
if error=2 then
gosub nofilerd:
goto doprintf:
endif
if error=3 then nopathpr:
heading:
cls
print "Printing...";
realfile$=ucase$(file$)
color 0,7
print realfile$
color 7,0
print
print
print "Press space bar to pause printing, or Esc to quit."
print
print
printmor:
input# 1, line$ crlf
if error=96 then
lprint line$
goto blanklin:
endif
contlprn:
lprint line$
a$=inkey$
if a$=b$ then
print "Printing has been terminated. The printer may still have data in its"
print "buffer. If so, it will continue printing until the buffer is empty."
lprint f$
close 1
file$=""
print
print
print "Print another file? (y/n) ";
goto wait13:
endif
if a$=e$ then
print "Press any key to resume printing. ";
gosub continue:
endif
if error=99 then eofp:
goto printmor:
blanklin:
input# 1, line$ crlf
if line$="" then printmor: else contlprn:
eofp:
lprint line$
print "Finished."
close 1
lprint f$
file$=""
print
print
print "Print another file? (y/n) ";
wait13:
gosub continue:
if a$="y" then printfil:
if a$="Y" then printfil:
if a$="n" then menu:
if a$="N" then menu:
goto wait13:
rem This is the end of the routine for printing text files.
rem Here is the routine for running other programs.
runother:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "Please type the full name of the program you want to run (for example,"
print "MYPROGRM.COM). Include the drive and path."
gosub retypefi:
print ""
print "You can specify an argument to your program, but it must be one phrase"
print "(no spaces). Do you want to specify an argument (y/n)";
wait25:
gosub continue:
if a$="y" then getargum:
if a$="Y" then getargum:
if a$="n" then
argument$=""
goto dorunoth:
endif
if a$="N" then
argument$=""
goto dorunoth:
endif
goto wait25:
getargum:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "Please type the argument you'd like to use. It can only be one phrase"
print "and cannot contain any spaces. ";
dorunoth:
argument$=file$
argument$=e$+argument$
call file$,argument$
file$=""
argument$=""
cls
print "Would you like to run another program (y/n)? ";
wait30:
gosub continue:
if a$="y" then runother:
if a$="Y" then runother:
if a$="n" then menu:
if a$="N" then menu:
goto wait30:
rem This is the end of the routine for running other programs.
rem Here is the routine for removing directories.
removedr:
cls
print " Remove Directories"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "Before you can remove a directory, you must remove all files in that"
print "directory, and in its subdirectories. You must then remove all sub-"
print "directories."
print
print
removagn:
print "Please type the name of the directory you'd like to remove. Include"
print "the drive and path. ";
gosub retypefi:
directory$=file$
reremove:
rmdir directory$
realfile$=ucase$(directory$)
print ""
print ""
print realfile$;
print " has been removed."
print ""
print ""
print "Would you like to remove another directory? ";
wait40:
gosub continue:
if a$="y" then removagn:
if a$="Y" then removagn:
if a$="n" then menu:
if a$="N" then menu:
goto wait40:
rem This is the end of the routine for removing directories.
rem Here is the routine for copying text files.
copyfile:
cls
print " Copy File"
print
print
print "*****PLEASE NOTE***** Only text files will copy properly using this"
print "method. Files with an extension of .EXE, .COM, or which contain other"
print "special characters will usually not copy properly."
print
print "Press any key to continue. ";
gosub continue:
copymore:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print
print "File to copy (include drive and path)? ";
gosub retypefi:
file1$=file$
file$=""
realfil1$=ucase$(file1$)
print ""
print "Destination (include drive and path)? ";
gosub retypefi:
file2$=file$
realfil2$=ucase$(file2$)
open "i",1,file1$
open "o",2,file2$
wait3:
input # 1, line$ crlf
if error=99 then copydone:
if error=96 then
print # 2, line$ nonull
input # 1, line$ crlf
if line$="" then
print # 2, crlf$ nonull
goto wait3:
endif
endif
print # 2, line$ nonull
print # 2, crlf$ nonull
goto wait3:
copydone:
close 1
close 2
print ""
print ""
print realfil1$;
print " has been copied to ";
print realfil2$;
print "."
print
print "Copy another? ";
wait46:
gosub continue:
if a$="y" then copymore:
if a$="Y" then copymore:
if a$="n" then menu2:
if a$="N" then menu2:
goto wait46:
rem This is the end of the routine for copying a text file.
rem Here is the routine for moving text files.
movefile:
cls
print " Move File"
print
print
print "*****PLEASE NOTE***** Only text files will move properly using this"
print "method. Files with an extension of .EXE, .COM, or which contain other"
print "special characters will usually not move properly. In addition, this"
print "option is destructive, destroying the original file. You are urged"
print "to make backups before attempting any procedure which can change a"
print "file."
print
print "Press Esc to quit, or any other key to continue. ";
gosub continue:
if a$=b$ then menu2:
movemore:
cls
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "File to copy (include drive and path)? ";
gosub retypefi:
file1$=file$
realfil1$=ucase$(file1$)
file$=""
print ""
print "Destination (include drive and path)? ";
gosub retypefi:
file2$=file$
realfil2$=ucase$(file2$)
file$=""
domove:
open "i",1,file1$
open "o",2,file2$
wait26:
input # 1, line$ crlf
if error=99 then movedone:
if error=96 then
print # 2, line$ nonull
input # 1, line$ crlf
if line$="" then
print # 2, crlf$ nonull
goto wait26:
endif
endif
print # 2, line$ nonull
print # 2, crlf$ nonull
goto wait26:
movedone:
close 1
close 2
kill file1$
print ""
print ""
print realfil1$;
print " has been moved to ";
print realfil2$;
print "."
print
print "Move another? ";
wait29:
gosub continue:
if a$="y" then movemore:
if a$="Y" then movemore:
if a$="n" then menu2:
if a$="N" then menu2:
goto wait29:
rem This is the end of the routine for moving a file.
rem Here is the routine for typing in files in 80-column mode.
retypefi:
gosub continue:
if a$=b$ then
file$=""
file1$=""
file2$=""
goto menu:
endif
if a$=c$ then
return
endif
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=79
locate a,b
print e$;
locate a,b
endif
goto retypefi:
endif
print a$;
file$=file$+a$
realfile$=ucase$(file$)
goto retypefi:
rem This is the end of the routine for typing in files in 80-column mode.
rem Here is the routine for typing in files in 40-column mode.
retypf40:
gosub continue:
if a$=b$ then
file$=""
file1$=""
file2$=""
goto menu40:
endif
if a$=c$ then
return
endif
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=38
locate a,b
print e$;
locate a,b
endif
goto retypf40:
endif
print a$;
file$=file$+a$
goto retypf40:
rem This is the end of the routine for typing in files in 40-column mode.
rem Here is the routine for continuing when the user presses a key.
continue:
a$=inkey$
if a$="" then continue:
return
rem This is the end of the routine for continuing when the user presses a key.
rem Here is the subroutine for initializing row/column position of cursor.
cursor:
a=csrlin
b=pos(0)
c=b-1
return
rem This is the end of the routine for initializing cursor position.
rem Here is the routine for generating 40-column width for visually impaired
rem people.
rem In order to make certain the screen writes are readable, the entire program
rem is essentially rewritten in this module.
menu40:
width 40
print "Your Options:"
print
print
print "F1- View Your Files."
print
print "F2- Delete Files."
print
print "F3- Make a directory."
print
print "F4- Rename Files."
print
print "F5- Get the Time/Date."
print
print "F6- Shell to DOS."
print
print "F7- Blank Your Screen."
print
print "F8- Next menu."
print
print "Esc- Quit."
print
print
print "Please press the key corresponding to"
print "your choice. ";
wait12:
gosub continue:
if a$=b$ then
cls
end
endif
if extended=0 then wait12:
if a$=";" then
call ("seefiles.com","/40")
endif
if a$="<" then killfl40:
if a$="=" then makedr40:
if a$=">" then renfil40:
if a$="?" then timedt40:
if a$="@" then shell40:
if a$="A" then
gosub blankscr:
endif
if a$="B" then 2dmenu40:
goto wait12:
2dmenu40:
cls
print "Here are your remaining options:"
print
print
print "F1- Change to 80-column mode."
print
print "F2- Print file."
print
print "F3- Return to the first menu."
print
print "F4- See a list of parameters you can"
print "use from DOS."
print
print "Esc- Quit."
print
print
print "Please press the key corresponding to"
print "your choice. ";
wait58:
gosub continue:
if a$=b$ then
cls
end
endif
if extended=0 then wait58:
if a$=";" then
width 80
goto menu:
endif
if a$="<" then prfile40:
if a$="=" then menu40:
if a$=">" then help40:
goto wait58:
rem Here is the routine for deleting files in 40-column mode.
killfl40:
width 40
print "Delete Files"
print
print
print "Before going any further, you should"
print "be aware that, once a file has been"
print "deleted, it is very difficult to"
print "retrieve it. From this program, it is"
print "impossible; I lack the skill to make"
print "an undelete feature available."
print
print
print "Press any key to continue, or Esc to"
print "quit. ";
gosub continue:
if a$=b$ then menu40:
delagn40:
cls
print "Delete Files"
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "File to delete? ";
gosub retypf40:
realfile$=ucase$(file$)
print ""
print ""
print ""
print "All the data in ";
print realfile$;
print " will be de-"
print "stroyed."
print
print
print "Press any key to continue, or Esc to"
print "quit. ";
gosub continue:
if a$=b$ then menu40:
rekill40:
kill file$
if error=2 then noflkf40:
if error=5 then ilglkf40:
print ""
print ""
print realfile$;
print " has been deleted."
file$=""
print
print "Delete another? (y/n) ";
wait15:
gosub continue:
if a$="y" then delagn40:
if a$="Y" then delagn40:
if a$="n" then menu40:
if a$="N" then menu40:
goto wait15:
rem This is the end of the routine for deleting files in 40-column mode.
rem Here is the routine for making a directory in 40-column mode.
makedr40:
width 40
print "Make a Directory"
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Directory name (include drive and"
print "path)? ";
gosub retypf40:
directory$=file$
realdir$=ucase$(directory$)
remake40:
mkdir directory$
if error=3 then nopthm40:
if error=5 then ilglmd40:
print ""
print ""
print "You have created directory: "
print
print realdir$
directory$=""
print
print
print "Would you like to make another"
print "directory? (y/n) ";
wait16:
gosub continue:
if a$="y" then makedr40:
if a$="Y" then makedr40:
if a$="n" then menu40:
if a$="N" then menu40:
goto wait16:
rem This is the end of the routine for making directories in 40-column mode.
rem Here is the routine for renaming files in 40-column mode.
renfil40:
width 40
print "Rename Files."
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Name of file to change (include drive"
print "and path)? ";
gosub retypf40:
file1$=file$
realfil1$=ucase$(file1$)
print ""
print ""
print "New name for ";
print file1$;
print "? "
print
file$=""
gosub retypf40:
file2$=file$
realfil2$=ucase$(file2$)
refile40:
name file1$ as file2$
if error=2 then noflrf40:
if error=3 then nopthr40:
if error=5 then ilglrf40:
if error=17 then difdrr40:
print ""
print ""
print realfil1$;
print " has been renamed"
print realfil2$
file1$=""
file2$=""
print
print "Rename another? (y/n) ";
wait17:
gosub continue:
if a$="y" then renfil40:
if a$="Y" then renfil40:
if a$="n" then menu40:
if a$="N" then menu40:
goto wait17:
rem This is the end of the routine for renaming files in 40-column mode.
rem Here is the routine for getting the time/date in 40-column mode.
timedt40:
width 40
print "Here are your options:"
print
print
print "F1- Get the time."
print
print "F2- Get the date."
print
print "F3- Get both."
print
print "Esc- Return to the Main Options Menu."
print
print
print "Please press the key corresponding to"
print "your choice. ";
wait44:
gosub continue:
if a$=b$ then menu40:
if extended=0 then wait44:
if a$=";" then gettim40:
if a$="<" then getdat40:
if a$="=" then getbth40:
goto wait44:
gettim40:
cls
print "Get the Time"
print
print
print "In order to get the correct date, the"
print "computer's internal clock must be set"
print "correctly."
print
print
a$=time$
f$=mid$(a$,1,2)
d=val(f$)
if d>12 then
d=d-12
h$=" PM"
else
h$=" AM"
endif
if d=12 then
h$=" PM"
endif
e=d
g$=str$(e)
i$=mid$(a$,3,6)
j$=g$+i$
k$=ltrim$(j$)
print "The time is now: ";
print k$;
print h$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedt40:
getdat40:
width 40
print "Get the Date"
print
print
print "In order for this feature to work"
print "properly, the date in your computer"
print "must be set properly. If it isn't,"
print "you may get a weird date."
print
print
print
print
print
a$=date$
print "Today's date is ";
print a$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedt40:
getbth40:
cls
print "Get Both"
print
print
print "In order to get the correct time and"
print "date, the clock and calendar have to"
print "be set properly."
print
print
a$=time$
f$=mid$(a$,1,2)
d=val(f$)
if d>12 then
d=d-12
h$=" PM"
else
h$=" AM"
endif
if d=12 then
h$=" PM"
endif
e=d
g$=str$(e)
i$=mid$(a$,3,6)
j$=g$+i$
k$=ltrim$(j$)
print "The time is now: ";
print k$;
print h$
print
print
a$=date$
print "Today's date is: ";
print a$
print
print
print "Press any key to continue. ";
gosub continue:
goto timedt40:
rem This is the end of the routine for getting the time and/or date (40-
rem columns).
rem Here is the routine for shelling to DOS in 40-column mode.
shell40:
cls
print "Shell to DOS"
print
print
print "On which drive is your COMMAND.COM?"
print "(Don't type the colon) ";
gosub continue:
path$=a$+":\command.com"
cls
print "Use the DOS command EXIT to return to"
print "The Manager."
call path$,""
if error=255 then nocall40:
goto menu40:
rem This is the end of the routine for shelling to DOS in 40-column mode.
rem Here are the help screens for 40-column mode.
help40:
width 40
print "You can use parameters with The Manager;"
print "they may save you time."
print
print
print "Typing MANAGER /40 will put you in"
print "40-column mode."
print
print "Typing MANAGER /40 ? will give you"
print "these help screens."
print
print "Typing MANAGER /40 D will let you"
print "delete files."
print
print "Typing MANAGER /40 M will let you"
print "make a directory."
print
print
print "Press any key to continue. ";
gosub continue:
cls
print "Typing MANAGER /40 N will let you"
print "rename files."
print
print "Typing MANAGER /40 G will let you see"
print "the time and/or date."
print
print "Typing MANAGER /40 B will let you"
print "blank your screen."
print
print "Typing MANAGER /40 S will let you"
print "a list of disk files."
print
print "Typing MANAGER /40 L will let you"
print "print a file on the lineprinter."
print
print "Either upper or lower case is fine."
print
print
print "Do you want to ";
color 0,15
print "C";
color 7,0
print "ontinue with the File"
print "Manager or return to ";
color 0,15
print "D";
color 7,0
print "OS?"
print
print
print "Please press the key corresponding to"
print "your choice. ";
wait43:
gosub continue:
if a$="c" then menu40:
if a$="C" then menu40:
if a$="d" then
cls
end
endif
if a$="D" then
cls
end
endif
goto wait43:
rem Here is the routine for printing a file in 40-column mode.
prfile40:
width 40
print "Print a File"
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Please type the name of the file you"
print "want to print."
print
print "Include the drive and path."
print
gosub retypf40:
realfile$=ucase$(file$)
doprfl40:
f$=chr$(12)
open "i",1,file$
if error=2 then nofilp40:
if error=3 then nopthp40:
headng40:
cls
print "Printing...";
realfile$=ucase$(file$)
color 0,7
print realfile$
color 7,0
print
print
print "Press space bar to pause printing, or"
print "Esc to quit."
print
print
prnmor40:
input# 1, line$ crlf
if error=96 then
lprint line$
goto blnkln40:
endif
contln40:
lprint line$
a$=inkey$
if a$=b$ then
print "Printing has been terminated. The"
print "printer may still have data in its"
print "buffer. If so, it will continue"
print "printing until the buffer is empty."
print
lprint f$
close 1
file$=""
print
print
print "Print another file? ";
goto wait14:
endif
if a$=e$ then
print "Press any key to resume printing. ";
gosub continue:
a$=""
goto headng40:
endif
if error=99 then eofp40:
goto prnmor40:
blnkln40:
input# 1, line$ crlf
if line$="" then prnmor40: else contln40:
eofp40:
lprint line$
print "Finished."
close 1
lprint f$
file$=""
print
print
print "Print another file? (y/n) ";
wait14:
gosub continue:
if a$="y" then prfile40:
if a$="Y" then prfile40:
if a$="n" then 2dmenu40:
if a$="N" then 2dmenu40:
goto wait14:
rem This is the end of the routine for printing a file in 40-column mode.
rem Here are the error-handling routines.
rem Here is the error routine for shelling to DOS in 80-column mode.
nocall:
cls
print "Hi. COMMAND.COM can't be found on the drive you've specified. You may"
print "have specified the wrong drive, or have failed to put your DOS disk in"
print "the drive you specified."
print
print "If you'd like to try again, you may return to the SHELL routine. If"
print "you want to cancel, you may return to the Main Options Menu."
print
print
print "Would you like to try again? (y/n) ";
wait21:
gosub continue:
if a$="y" then shelldos:
if a$="Y" then shelldos:
if a$="n" then menu:
if a$="N" then menu:
goto wait21:
rem This is the end of the error routine for shelling to DOS in 80-column mode.
rem Here is the error routine for shelling to DOS in 40-column mode.
nocall40:
cls
print "Hi. COMMAND.COM can't be found on the"
print "drive you've specified. You may have"
print "specified the wrong drive, or have"
print "failed to place your DOS disk into the"
print "drive you specified."
print
print "If you'd like to try again, you may"
print "return to the SHELL routine. If you'd"
print "rather not, you may return to the Main"
print "Options Menu."
print
print
print "Would you like to try again? (y/n) ";
wait22:
gosub continue:
if a$="y" then shell40:
if a$="Y" then shell40:
if a$="n" then menu40:
if a$="N" then menu40:
goto wait22:
rem This is the end of the error routine for shelling to DOS in 40-column mode.
rem Here are the error routines for killfile:
rem File Not Found (Error 2)
nofilekf:
file$=""
cls
print "Hi. The file you've specified for deletion cannot be found. Please"
print "check your spelling and/or path."
print
print "If you want to try again, please re-enter the file to be deleted. To"
print "quit and return to the Main Options Menu, press Esc."
print ""
print "File to be deleted? ";
gosub retypefi:
goto rekill:
rem Access Denied (Error 5)
illeglkf:
cls
print "Hi. You've tried to delete a protected file. DOS will not allow"
print "this. In order to delete it, you'll have to go to DOS and change"
print "your file to read-write status."
print
print
print "NOTE: THIS FILE MAY VERY WELL BE ESSENTIAL TO THE CORRECT OPERATION OF"
print "YOUR COMPUTER OR SOME PROGRAM YOU USE REGULARLY. DELETING IT MAY"
print "RENDER YOUR SYSTEM OR ONE OF YOUR PROGRAMS UNUSABLE. THAT'S USUALLY"
print "WHY FILES ARE PROTECTED WITH READ-ONLY STATUS."
print
print
print "Press Esc to return to the Main Options Menu, or any other key to try"
print "again with another file. ";
gosub continue:
if a$=b$ then menu:
goto deletagn:
rem This is the end of the error routine for dealing with "Access Denied".
rem This is the end of the error routines for killfile:
rem Here are the error routines for killfl40:
rem File Not Found (Error 2)
noflkf40:
file$=""
cls
print "Hi. The file you've specified for"
print "deletion can't be found. Please check"
print "your spelling and/or path."
print
print "If you want to try again, please"
print "re-enter the file to be deleted. To"
print "quit and return to the Main Options"
print "Menu, press Esc."
print
print "File to be deleted?"
gosub retypf40:
goto rekill40:
rem Access Denied (Error 5)
ilglkf40:
cls
print "Hi. You've tried to delete a protect-"
print "ed file. DOS will not allow this. In"
print "order to delete it, you'll have to go"
print "to DOS and change your file to read-"
print "write status."
print
print
print "PLEASE NOTE:"
print
print "THIS FILE MAY VERY WELL BE ESSENTIAL"
print "TO THE CORRECT OPERATION OF YOUR COM-"
print "PUTER OR SOME PROGRAM YOU USE REGULAR-"
print "LY. DELETING IT MAY RENDER YOUR SYS-"
print "TEM OR ONE OF YOUR PROGRAMS UNUSABLE."
print "THAT'S USUALLY THE REASON FILES ARE"
print "PROTECTED WITH READ-ONLY STATUS."
print
print
print "Press Esc to return to the Main"
print "Options Menu or any other key to try"
print "again with a different file. ";
gosub continue:
if a$=b$ then menu40:
goto delagn40:
rem This is the end of the error routines for killfl40:
rem Here are the error routines for makedir:
rem Path Not Found (Error 3)
nopathmd:
directory$=""
cls
print "Hi. The path you've specified can't be found. Please check your"
print "spelling and path, and try again."
print
print "To quit and return to the Main Options Menu, press Esc."
print "Directory name (include drive and path)? ";
gosub retypefi:
goto remakedr:
rem This is the end of the error routine for Path Not Found (makedir:)
rem Access Denied (Error 5)
illeglmd:
cls
print "Hi. The path you've specified is protected from changes. DOS will"
print "not allow you to make a directory using this path."
print
print
print "Press any key to return to the Main Options Menu. ";
gosub continue:
goto menu:
rem This is the end of the error routine for Access Denied (makedir:)
rem This is the end of the error routines for makedir:
rem Here are the error routines for makedr40:
rem Path Not Found (Error 3)
nopthm40:
directory$=""
cls
print "Hi. The path you've specified can't"
print "be found. Please check your spelling"
print "and path, and try again."
print
print "To quit and return to the Main Options"
print "Menu, press Esc."
print "Directory name (include drive and"
print "path)? ";
wait28:
gosub continue:
if a$=b$ then
directory$=""
goto menu40:
endif
if a$=c$ then remake40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(directory$)
e=d-1
directory$=mid$(directory$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait28:
endif
print a$;
directory$=directory$+a$
realdir$=ucase$(directory$)
goto wait28:
rem This is the end of the error routine for Path Not Found (makedr40:)
rem Access Denied (Error 5)
ilglmd40:
cls
print "Hi. The path you've specified is pro-"
print "tected. DOS will not allow you to"
print "make a directory using this path."
print
print
print "Press any key to return to the Main"
print "Options Menu. ";
gosub continue:
goto menu40:
rem This is the end of the error routine for Access Denied (makedr40:)
rem This is the end of the error routines for makedr40:
rem Here are the error routines for renfile:
rem File Not Found (Error 2)
nofilerf:
file1$=""
file2$=""
cls
print "Hi. The file you've specified can't be found. Please check your"
print "spelling and try again."
print
print "To quit and return to the Main Options Menu, press Esc."
print
print "File to rename? ";
wait31:
gosub continue:
if a$=b$ then
file1$=""
goto menu:
endif
if a$=c$ then nextfile:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file1$)
e=d-1
file1$=mid$(file1$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait31:
endif
print a$;
file1$=file1$+a$
realfil1$=ucase$(file1$)
goto wait31:
nextfile:
print ""
print ""
print "New name for ";
print realfil1$;
print "? ";
wait32:
gosub continue:
if a$=b$ then
file1$=""
file2$=""
goto menu:
endif
if a$=c$ then refile:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file2$)
e=d-1
file2$=mid$(file2$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait32:
endif
print a$;
file2$=file2$+a$
realfil2$=ucase$(file2$)
goto wait32:
rem This is the end of the File Not Found error handler (renfile:)
rem Path Not Found or File Doesn't Exist (Error 3)
nopathrf:
file1$=""
file2$=""
cls
print "Hi. DOS can't find the path you've specified. Please check your"
print "spelling and path, and try again."
print
print "To quit and return to the Main Options Menu, press Esc."
print
print
print "File to rename? ";
wait35:
gosub continue:
if a$=b$ then
file1$=""
goto menu:
endif
if a$=c$ then 2cndfile:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file1$)
e=d-1
file1$=mid$(file1$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait35:
endif
print a$;
file1$=file1$+a$
realfil1$=ucase$(file1$)
goto wait35:
2cndfile:
print ""
print ""
print "New name for ";
print realfil1$;
print "? ";
wait36:
gosub continue:
if a$=b$ then
file1$=""
file2$=""
goto menu:
endif
if a$=c$ then refile:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file2$)
e=d-1
file2$=mid$(file2$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait36:
endif
print a$;
file2$=file2$+a$
realfil2$=ucase$(file2$)
goto wait36:
rem This is the end of the error routine for Path Not Found (renfile:)
rem Here is the error routine for Access Denied (Error 5)
illeglrf:
cls
print "Hi. The file you've specified is protected. DOS will not allow you"
print "to rename this file."
print
print
print "Press any key to return to the Main Options Menu. ";
gosub continue:
goto menu:
rem This is the end of the routine for Access Denied (renfile:)
rem Here is the error routine for Not same Disk Drive (Error 17)
diffdrrf:
file2$=""
cls
print "Hi. You've specified a different drive for your renamed file than it"
print "was originally on. If, for example, your original file was on drive"
print "A, the renamed file must be on drive A as well."
print
print "Please check your spelling and/or path, and try again. To quit and"
print "return to the Main Options Menu, press Esc."
print
print
print "New name for ";
print realfil1$;
print "? ";
wait41:
gosub continue:
if a$=b$ then
file1$=""
file2$=""
goto menu:
endif
if a$=c$ then refile:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file2$)
e=d-1
file2$=mid$(file2$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait41:
endif
print a$;
file2$=file2$+a$
realfil2$=ucase$(file2$)
goto wait41:
rem This is the end of the error routine for Not Same Disk Drive (renfile:)
rem Here are the error routines for renfil40:
rem File Not Found (Error 2)
noflrf40:
file1$=""
file2$=""
cls
print "Hi. The file you've specified can't"
print "be found. Please check your spelling"
print "and path, and try again."
print
print "To quit and return to the Main Options"
print "Menu, press Esc."
print
print
print "File to rename? ";
wait33:
gosub continue:
if a$=b$ then
file1$=""
goto menu40:
endif
if a$=c$ then nxtmnu40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file1$)
e=d-1
file1$=mid$(file1$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait33:
endif
print a$;
file1$=file1$+a$
realfil1$=ucase$(file1$)
goto wait33:
nxtmnu40:
print ""
print ""
print "New name for ";
print realfil1$;
print "? ";
wait34:
gosub continue:
if a$=b$ then
file1$=""
file2$=""
goto menu40:
endif
if a$=c$ then refile40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file2$)
e=d-1
file2$=mid$(file2$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait34:
endif
print a$;
file2$=file2$+a$
realfil2$=ucase$(file2$)
goto wait34:
rem This is the end of the File Not Found error handler (renfil40:)
rem Path Not Found or File Doesn't Exist (Error 3)
nopthr40:
file1$=""
file2$=""
cls
print "Hi. DOS can't find the path you've"
print "specified. Please check your spelling"
print "and path, and try again."
print
print "To quit and return to the Main Options"
print "Menu, press Esc."
print
print
print "File to rename? ";
wait37:
gosub continue:
if a$=b$ then
file1$=""
goto menu40:
endif
if a$=c$ then 2cndfl40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file1$)
e=d-1
file1$=mid$(file1$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait37:
endif
print a$;
file1$=file1$+a$
realfil1$=ucase$(file1$)
goto wait37:
2cndfl40:
print ""
print ""
print "New name for ";
print realfil1$;
print "? ";
wait38:
gosub continue:
if a$=b$ then
file1$=""
file2$=""
goto menu40:
endif
if a$=c$ then refile40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file2$)
e=d-1
file2$=mid$(file2$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait38:
endif
print a$;
file2$=file2$+a$
realfil2$=ucase$(file2$)
goto wait38:
rem This is the end of the routine for Path Not Found (renfil40:)
rem Here is the error routine for Access Denied (Error 5)
ilglrf40:
cls
print "Hi. The file you've specified is pro-"
print "tected. DOS will not allow you to re-"
print "name this file."
print
print
print "Press any key to return to the Main"
print "Options Menu. ";
gosub continue:
goto menu40:
rem This is the end of the error routine for Access Denied (renfil40:)
rem Here is the routine for Not Same Disk Drive (Error 17)
difdrr40:
file2$=""
cls
print "Hi. You've specified a different"
print "drive for your file than it was orig-"
print "inally on. For instance, if the orig-"
print "inal file was on drive A, the renamed"
print "file must be on drive A as well."
print
print "Please check your spelling and/or path"
print "and try again. To quit and return to"
print "the Main Options Menu, press Esc."
print
print
print "New name for ";
print realfil1$;
print "? "
wait42:
gosub continue:
if a$=b$ then
file1$=""
file2$=""
goto menu40:
endif
if a$=c$ then refile40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file2$)
e=d-1
file2$=mid$(file2$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait42:
endif
print a$;
file2$=file2$+a$
realfil2$=ucase$(file2$)
goto wait42:
rem This is the end of the error routine for Not Same Disk Drive (renfil40:)
rem Here is the error routine for File Not Found (Error 2, readfile:)
nofilerd:
file$=""
cls
print "Hi. The file you've selected can't be found. Please check your"
print "spelling and/or path, and try again. To return to the Main Options"
print "Menu, press Esc at any time."
print
print
print "File? ";
wait57:
gosub continue:
if a$=b$ then
file$=""
goto menu:
endif
if a$=c$ then
cls
return
endif
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait57:
endif
print a$;
file$=file$+a$
goto wait57:
rem This is the end of the error routine for File Not Found (readfile:)
rem Here is the error routine for File Not Found (prfile40:)
nofilp40:
cls
file$=""
print "Hi. The file you've specified can't be found. Please check your"
print "spelling and try again. To quit and return to the Main Options Menu,"
print "press Esc at any time."
print
print
print "File to print? ";
wait18:
gosub continue:
if a$="" then wait18:
if a$=b$ then
file$=""
goto 2dmenu40:
endif
if a$=c$ then doprfl40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
c=c+1
locate a,c
endif
goto wait18:
endif
print a$;
file$=file$+a$
goto wait18:
rem This is the end of the error routine for File Not Found (prfile40:).
rem Here is the error routine for Path Not Found (prfile40:)
nopthp40:
file$=""
cls
print "Hi. The path you've specified can't be found. Please check your"
print "spelling and try again. To quit and return to the Main Options Menu,"
print "press Esc at any time."
print
print
print "File to print? ";
wait19:
gosub continue:
if a$="" then wait19:
if a$=b$ then
file$=""
goto 2dmenu40:
endif
if a$=c$ then doprfl40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
goto wait19:
endif
print a$;
file$=file$+a$
goto wait19:
rem This is the end of the error routine for Path Not Found (prfile40:)
rem Here is the error routine for Path Not Found (readfile:)
nopathrd:
file$=""
cls
print "Hi. The path you've specified can't be found. Please check your"
print "spelling and path, and try again. To quit and return to the Main Op-"
print "tions Menu, press Esc at any time."
print
print "File to read? ";
wait1:
gosub continue:
if a$=b$ then
file$=""
goto menu:
endif
if a$=c$ then
cls
goto reread:
endif
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=79
locate a,b
print e$;
locate a,b
endif
goto wait1:
endif
print a$;
file$=file$+a$
goto wait1:
rem This is the end of the error routine for Path Not Found (readfile:)
rem Here is the error routine for Path Not Found (printfil:)
nopathpr:
file$=""
cls
print "Hi. The path you've specified can't be found. Please check your"
print "spelling and path and try again. To quit and return to the Main Op-"
print "tions Menu, press Esc at any time."
print
print "File to print? ";
wait10:
gosub continue:
if a$=b$ then
file$=""
goto menu:
endif
if a$=c$ then doprintf:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(file$)
e=d-1
file$=mid$(file$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=79
locate a,b
print e$;
locate a,b
endif
goto wait10:
endif
print a$;
file$=file$+a$
goto wait10:
end