home *** CD-ROM | disk | FTP | other *** search
- ┌───────────────────────────────────────────────────────────────────┐
- │ ▒▒▄ ▒▒▄ ▒▒▄ ▒▒▒▒▒▒▄ │
- │ ▒▒█ ▒▒█ ▒▒█ ▒▒█▀▒▒█ │
- │ ▒▒█ ▒▒▒▒▒▒█ ▒▒▒▒▒█▀ │
- │ ▒▒▄ ▒▒█ ▒▒█▀▒▒█ ▒▒█▀▒▒▄ │
- │ ▒▒▒▒█▀ ▒▒█ ▒▒█ ▒▒█ ▒▒█ │
- │ ▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ │
- │ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▄ ▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ │
- │ ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▀▀▀▀ ▀▒▒█▀▀ ▒▒█ ▒▒█ ▒▒█▀▒▒█ ▒▒█▀▒▒█ ▒▒█▀▀▀▀ │
- │ ▒▒▒▒▒▒▄ ▒▒█ ▒▒█ ▒▒▒▒▒▄ ▒▒█ ▒▒█ ▒▒█ ▒▒▒▒▒▒█ ▒▒▒▒▒█▀ ▒▒▒▒▒▄ │
- │ ▀▀▀▒▒█ ▒▒█ ▒▒█ ▒▒█▀▀▀ ▒▒█ ▒▒█▒▒▄▒▒█ ▒▒█ ▒▒█ ▒▒█▀▒▒▄ ▒▒█▀▀▀ │
- │ ▒▒▒▒▒▒█ ▒▒▒▒▒▒█ ▒▒█ ▒▒█ ▀▒▒▒▒█▀▀ ▒▒█ ▒▒█ ▒▒█ ▒▒█ ▒▒▒▒▒▒▄ │
- │ ▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀▀▀ │
- └───────────────────────────────────────────────────────────────────┘
-
- J.H.R. Software is a TradeMark of J.H.Rietveld.
-
- Copyright (c) 1992,93,94 / J.H.R. Software (TM) / All rights reserved
-
- J.H.R. Software (TM) / Burg Elsenlaan 197 / 2282 NE / Rijswijk / Holland.
-
- Postbank Rec.Nr. : 3625008 / ABN-AMRO Bank Rec.Nr. : 43.15.68.383
-
- Phone BBS : 31-70-3904193 / Phone FAX : 31-70-3904193
-
- ├────────────────────────────────────────────────────────────────────────────┤
-
- KEY_DATE.EXE : The program.
- KEY_DATE.ENG : This file.
- COPYRIGH.T'S : J.H.R. Software info file.
-
- (*=------------------------------------------------------------------------=*)
-
- ■ Key_Date is a very small and useful util to use in your Autoexec.bat or
- in any other batch file.
-
- ■ The program can turn the Num_Lock, Caps_lock and Scroll_lock on or off.
-
- ■ The screen can be turned on. (standard you see nothing of this program).
-
- ■ The program can wait on a F key (F1 to F10) and returns the coressponding
- ERRORLEVEL 1 to 10.
-
- ■ The program can update the date of the EXE file to that of the current day,
- in that case the program stops with errorlevel 1 so you can run a program
- once a day in a batch file.
-
- ■ The program can stop with a errorlevel according to the day of the week.
-
- ■ The program can stop with a errorlevel according to the month.
-
- (*=------------------------------------------------------------------------=*)
-
- The program reads the parameters in sequence but the Scroll_lock, Num_lock
- and Caps_lock keys first and then the rest of the parameters.
-
- If you set the -E and -D parameter, then only the -E parameter is processed.
-
- Parameters that ALWAYS are processed are -S, -C, -N and -B
-
- An overview of possible parameters follows below.
-
- (*=------------------------------------------------------------------------=*)
-
- -S??? "??? = ON or OFF" ( Turns the Scroll lock key on or off )
-
- -C??? "??? = ON or OFF" ( Turns the Caps lock key on or off )
-
- -N??? "??? = ON or OFF" ( Turns the Num lock key on or off )
-
- -B "Makes sure that everything is displayed on the screen."
-
- -T "Makes the program wait for a Function key (errorlevel F-key)"
-
- -E "Sets the date of the EXE file to the current day ( Errorlevel 1 )"
-
- -D "Gives the errorlevel of the day of the week ( errorlevel 1 to 7 )"
-
- -M "Gives the errorlevel of the month ( errorlevel 1 to 12 )"
-
- (*=------------------------------------------------------------------------=*)
-
- ■ -Son turns the Scroll Lock key ON.
- ■ -Soff turns the Scroll Lock key OFF.
-
- ■ -Con turns the Caps Lock key ON.
- ■ -Coff turns the Caps Lock key OFF.
-
- ■ -Non turns the Num Lock key ON.
- ■ -Noff turns the Num Lock key OFF.
-
- ■ -B Shows everything on the screen, normaly nothing is displayed.
-
- ■ -T Waits for a F-key. With this you can check for the F1 to F10 keys and
- the program returns an errorlevel from 1 to 10.
-
- ■ -E This is used to set the date of KEY_DATE.EXE to today. When this is done
- the program returns an errorlevel 1, but if the date is already set to
- the current date then no errorlevel is given.
-
- ■ -D Gives an ERRORLEVEL according to the day of the week.
- Sunday = 1, Monday = 2, Thuesday = 3, etc Saterday = 7
-
- ■ -M Gives an ERRORLEVEL according to the month of the year.
- January = 1, February = 2, March = 3, etc December = 12.
-
- (*=------------------------------------------------------------------------=*)
-
- Remember that all ERRORLEVELS in a batch file are set from HIGH to LOW.
-
- An example how to use this program in a batch file follows below.
-
- (*=------------------------------------------------------------------------=*)
-
- Echo Off
- Cls
-
- :MAIN
- Cls
- Echo F1 = Chkdks A:
- Echo F2 = Chkdsk B:
- Echo F3 = Format A:
- Echo F4 = Format B:
- Echo F5 = Diskcopy A: A:
- Echo F6 = Diskcopy B: B:
- Echo F7 = Del A:\*.*
- Echo F8 = Del B:\*.*
- Echo F9 = Stop and return to DOS
- Echo ------------------------------------
- Echo -Press a Function key of your choise
- Echo ------------------------------------
- KEY_DATE -T
-
- IF Errorlevel = 9 goto F9
- IF Errorlevel = 8 goto F8
- IF Errorlevel = 7 goto F7
- IF Errorlevel = 6 goto F6
- IF Errorlevel = 5 goto F5
- IF Errorlevel = 4 goto F4
- IF Errorlevel = 3 goto F3
- IF Errorlevel = 2 goto F2
- IF Errorlevel = 1 goto F1
-
- Goto MAIN
-
- :F1
- Chkdsk A:
- goto MAIN
-
- :F2
- Chkdsk B:
- goto MAIN
-
- :F3
- Format A:
- goto MAIN
-
- :F4
- Format B:
- goto MAIN
-
- :F5
- Diskcopy A: A:
- goto MAIN
-
- :F6
- Diskcopy B: B:
- goto MAIN
-
- :F7
- Del A:\*.*
- goto MAIN
-
- :F8
- Del B:\*.*
- goto MAIN
-
- :F9
- Clrscr;
- echo Bey.
-
- (*=------------------------------------------------------------------------=*)
-
- This example works with the functionkeys.
-
- The reading of an errorlevel in a batch file is rather easy.
-
- IF ERRORLEVEL ??? goto ???
-
- Remember that the HIGHEST errorlevel must be on top of the list.
-
- A LABEL in a batch file always starts with : and behind the GOTO you can
- use the label without the collon.
-
- Succes with the use of this util.
-
- Finaly an example how I use this program.
-
- (*=------------------------------------------------------------------------=*)
-
- Echo Off
- Cls
-
- Prompt $P$G
-
- KEY_DATE.EXE -E
-
- If Not Errorlevel 1 Goto START
-
- C:\Utils\SCAN C: /D
-
- C:\Huishoud\A&V\A&V.EXE /W
- C:\Huishoud\A&V\A&V.EXE /D31
-
- :START
-
- Cls
-
- (*=------------------------------------------------------------------------=*)
- ┌───────────────────────────────────────────────────────────────────┐
- │ ▒▒▄ ▒▒▄ ▒▒▄ ▒▒▒▒▒▒▄ │
- │ ▒▒█ ▒▒█ ▒▒█ ▒▒█▀▒▒█ │
- │ ▒▒█ ▒▒▒▒▒▒█ ▒▒▒▒▒█▀ │
- │ ▒▒▄ ▒▒█ ▒▒█▀▒▒█ ▒▒█▀▒▒▄ │
- │ ▒▒▒▒█▀ ▒▒█ ▒▒█ ▒▒█ ▒▒█ │
- │ ▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ │
- │ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▄ ▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ │
- │ ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▀▀▀▀ ▀▒▒█▀▀ ▒▒█ ▒▒█ ▒▒█▀▒▒█ ▒▒█▀▒▒█ ▒▒█▀▀▀▀ │
- │ ▒▒▒▒▒▒▄ ▒▒█ ▒▒█ ▒▒▒▒▒▄ ▒▒█ ▒▒█ ▒▒█ ▒▒▒▒▒▒█ ▒▒▒▒▒█▀ ▒▒▒▒▒▄ │
- │ ▀▀▀▒▒█ ▒▒█ ▒▒█ ▒▒█▀▀▀ ▒▒█ ▒▒█▒▒▄▒▒█ ▒▒█ ▒▒█ ▒▒█▀▒▒▄ ▒▒█▀▀▀ │
- │ ▒▒▒▒▒▒█ ▒▒▒▒▒▒█ ▒▒█ ▒▒█ ▀▒▒▒▒█▀▀ ▒▒█ ▒▒█ ▒▒█ ▒▒█ ▒▒▒▒▒▒▄ │
- │ ▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀▀▀ │
- └───────────────────────────────────────────────────────────────────┘
-
- J.H.R. Software is a TradeMark of J.H.Rietveld.
-
- Copyright (c) 1992,93,94 / J.H.R. Software (TM) / All rights reserved
-
- J.H.R. Software (TM) / Burg Elsenlaan 197 / 2282 NE / Rijswijk / Holland.
-
- Postbank Rec.Nr. : 3625008 / ABN-AMRO Bank Rec.Nr. : 43.15.68.383
-
- Phone BBS : 31-70-3904193 / Phone FAX : 31-70-3904193
-
- ├────────────────────────────────────────────────────────────────────────────┤
-