home *** CD-ROM | disk | FTP | other *** search
- rem consecutive to wait2:
-
- 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)
-
- a$=command$
- if a$="/d" then killfl40:
- if a$="/cr" then calculat:
- if a$="/a" then asciilis:
- if a$="/c" then changedi:
- if a$="/i" then install:
-
- 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
- end
- endif
-
- delagn40:
- width 40
- 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
- end
- endif
-
- 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
- end
- endif
-
- if a$="N" then
- end
- endif
-
- goto wait15:
-
- rem This is the end of the routine for deleting files in 40-column mode.
-
-
- rem HERE IS THE ROUTINE FOR THE CRAPULATOR (CRAPPY CALCULATOR)
-
- calculat:
- width 40
- print "Welcome to the Crapulator!"
- print
- print
- print "You can add, subtract, or multiply two"
- print "numbers. You can use the numeric key-"
- print "pad if you like; Num Lock has been"
- print "turned on for you."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- call "numlockn.exe",""
- spaces$=space$(30)
- print spaces$;
- color 0,7
- print "Esc=Quit"
- color 7,0
- print
- print "Please enter your math problem. ";
- gosub calcmore:
-
- if operator$>"" then
- print operator$;
- calc1=val(calc$)
- goto checkcal:
- endif
-
- checkcal:
- if a$=c$ then
- calc2=val(calc$)
- goto docalc:
- else
- calc$=""
- gosub calcmore:
- goto checkcal:
- endif
-
- docalc:
- if operator$="+" then
- result=calc1+calc2
- print "=";
- print result
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- call "numlockf.exe",""
- calc$=""
- operator$=""
- calc1=0
- calc2=0
- result=0
- end
- endif
-
- if operator$="-" then
- result=calc1-calc2
- print "=";
- print result
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- call "numlockf.exe",""
- calc$=""
- operator$=""
- calc1=0
- calc2=0
- result=0
- end
- endif
-
- if operator$="*" then
- result=calc1*calc2
- print "=";
- print result
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- call "numlockf.exe",""
- calc$=""
- operator$=""
- calc1=0
- calc2=0
- result=0
- end
- endif
-
- calcmore:
- gosub continue:
-
- if a$=b$ then
- operator$=""
- calc$=""
- calc1=0
- calc2=0
- result=0
- call "numlockf.exe",""
- end
- endif
-
- if a$="+" then
- operator$="+"
- return
- endif
-
- if a$="-" then
- operator$="-"
- return
- endif
-
- if a$="*" then
- operator$="*"
- return
- endif
-
- if a$=c$ then
- return
- endif
-
- gosub cursor:
-
- if a$=d$ then
- locate a,c
- print e$;
- locate a,c
- d=len(calc$)
- e=d-1
- calc$=mid$(calc$,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 calcmore:
- endif
-
- print a$;
- calc$=calc$+a$
- goto calcmore:
-
- rem THIS IS THE END OF THE ROUTINE FOR THE CRAPULATOR (CRAPPY CALCULATOR).
-
-
- rem HERE IS THE ROUTINE FOR GENERATING AN ASCII LIST.
-
- asciilis:
- width 40
- print "Here are your options:"
- print
- print
- print "F1- Print the entire list."
- print
- print "F2- Print one code of your choice."
- print
- print "Esc- Quit to Main Options Menu."
- print
- print
- print "Please press the key corresponding to"
- print "your choice. ";
-
- wait:
- gosub continue:
-
- if a$=b$ then
- end
- endif
-
- if extended=0 then wait:
- if a$=";" then printlis:
- if a$="<" then printone:
- goto wait:
-
- printlis:
- cls
- for c=0 to 255
- print c;
- print " - ";
- a$=chr$(c)
-
- if c=0 then
- a$=" "
- endif
-
- print a$;
- print " ";
- column=column+1
-
- if column=3 then
- print
- column=0
- row=row+1
- endif
-
- if row=20 then
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- row=0
- cls
- endif
-
- next c
- print
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- end
-
- printone:
- width 40
- print "Please type the code number of the"
- print "character you want to view, from 0 to"
- print "255. ";
- gosub retypf40:
- d=val(file$)
- file$=""
- if a<0 then printone:
- if a>255 then printone:
- onecode$=chr$(d)
- locate 12,20
- print onecode$
- print
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- end
-
- rem THIS IS THE END OF THE ROUTINE FOR GENERATING AN ASCII LIST.
-
-
- rem HERE IS THE ROUTINE FOR CHANGING THE DEFAULT DIRECTORY.
-
- changedi:
- width 40
- spaces$=space$(30)
- print spaces$;
- color 0,7
- print "Esc=Quit"
- color 7,0
- print
- print
- print "Change Directory"
- print
- print
- print "This option will change the default"
- print "directory where The Manager will look"
- print "for files if you don't specify the"
- print "path. It's also the directory you'll"
- print "be in when you return to DOS, unless"
- print "you come back here and change to your"
- print "previous directory before exiting. At"
- print "this time, there is no way to change"
- print "the default drive."
- print
- print
- print "Directory to change to? ";
- gosub retypf40:
- directory$=file$
- file$=""
-
- rechange:
- chdir directory$
- if error=3 then nopathch:
- realdir$=ucase$(directory$)
- cls
- print
- print
- print "Your new default directory is"
- print realdir$;
- print "."
- print ""
- print ""
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- end
-
- rem THIS IS THE END OF THE ROUTINE FOR CHANGING THE DEFAULT DIRECTORY.
-
-
- rem HERE IS THE ROUTINE FOR INSTALLING AN AUTOMATIC PARAMETER.
-
- install:
- width 40
- print "This option will install an automatic"
- print "parameter. When you type MANAGER"
- print "without any parameters, it will auto-"
- print "matically go to this option. For"
- print "instance, if you want to go directly"
- print "to the option for deleting files every"
- print "time you run The Manager, you can in-"
- print "stall that option here."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
-
- installm:
- cls
- print "Here are some options you can install:"
- print
- print
- print "F1- Help Screen."
- print
- print "F2- Delete Files."
- print
- print "F3- Make Directory."
- print
- print "F4- Rename Files."
- print
- print "F5- Get the Time/Date."
- print
- print "F6- Blank the Screen."
- print
- print "F7- Check for Graphics Card."
- print
- print "N- Next Menu."
- print
- print "Esc- Quit."
- print
- print
- print "Please press the key corresponding to"
- print "your choice. ";
-
- wait2:
- gosub continue:
-
- if a$=b$ then
- end
- endif
-
- if a$="n" then instalm2:
- if a$="N" then instalm2:
- if extended=0 then wait2:
- open "o",1,"install.cfg"
-
- if a$=";" then
- install$="/?"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="<" then
- install$="/d"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="=" then
- install$="/m"
- gosub writeins:
- goto writedon:
- endif
-
- if a$=">" then
- install$="/n"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="?" then
- install$="/g"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="@" then
- install$="/b"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="A" then
- install$="/p"
- gosub writeins:
- goto writedon:
- endif
-
- goto wait2:
-
- instalm2:
- cls
- print "Here are more options you can install:"
- print
- print
- print "F8- Blank the Screen."
- print
- print "F9- Print File."
- print
- print "<Alt-F1>- Run Other Programs."
- print
- print "<Alt-F2>- Remove Directory."
- print
- print "<Alt-F3>- Copy Text File."
- print
- print "<Alt-F4>- Move Text File."
- print
- print "<Alt-F5>- Use 80-Column Mode."
- print
- print "<Alt-F6>- De-install Options."
- print
- print "Esc- Quit."
- print
- print
- print "Please press the key corresponding to"
- print "your choice. ";
-
- wait3:
- gosub continue:
-
- if a$=b$ then
- end
- endif
-
- if extended=0 then wait3:
- open "o",1,"install.cfg"
-
- if a$="B" then
- install$="/s"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="C" then
- install$="/l"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="D" then
- install$="/r"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="h" then
- install$="/e"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="i" then
- install$="/c"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="j" then
- install$="/o"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="k" then
- install$="nothing"
- gosub writeins:
- goto writedon:
- endif
-
- if a$="l" then
- install$="nothing"
- gosub writeins:
- goto writedon:
- endif
-
- goto wait3:
-
- writeins:
- print # 1, install$
- close 1
- return
-
- writedon:
- cls
- print "The options you have chosen will now"
- print "be run every time you load The Manager"
- print "without parameters. To choose another"
- print "option, or to de-install all options,"
- print "return to the install menu and press"
- print "the appropriate key."
- print
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- end
-
- rem THIS IS THE END OF THE ROUTINE FOR INSTALLING A DOS PARAMETER.
-
-
- rem Here is the routine for typing in files in 40-column mode.
-
- retypf40:
- gosub continue:
-
- if a$=b$ then
- file$=""
- file1$=""
- file2$=""
- return
- 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 .........................................................................
-
- rem ERROR ROUTINES
-
- rem .........................................................................
-
-
- 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
- end
- endif
-
- goto delagn40:
-
- rem This is the end of the error routines for killfl40:
-
-
- rem THIS IS THE ERROR ROUTINE FOR PATH NOT FOUND (CHANGEDI:)
-
- nopathch:
- cls
- print "Hi. The path you've specified can't"
- print "be found. Please check your spelling"
- print "and path and try again. To quit and"
- print "return to the Main Options Menu, press"
- print "Esc at any time."
- print
- print
- print "Directory to change to? ";
- gosub retypf40:
- directory$=file$
- file$=""
- goto rechange:
-
- rem THIS IS THE END OF THE ERROR ROUTINE FOR PATH NOT FOUND (CHANGEDI:)
-
-
- rem .........................................................................
-
- rem THIS IS THE END OF THE ERROR ROUTINES.
-
- rem .........................................................................
-
-
- end
-