home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / CHKEYS.ZIP / CHECKEYS.DOC next >
Text File  |  1993-10-29  |  3KB  |  89 lines

  1.       Check Keys - DEMO FILES
  2.       ChkShift, ChkAlt, ChkCtrl
  3.       (c) Copyright 1993, Paradigm Software, All Rights Reserved
  4.  
  5.       These 3 utilities will check to see if the shift, alt or ctrl key
  6.       is being held down.  If so, they will set the DOS errorlevel in  
  7.       order to stop batch file processing.  They can help you setup a  
  8.       conditional batch file with a default action.  They will not stop
  9.       processing if the user did not hold the key down.
  10.  
  11.    Usage
  12.  
  13.       CHKSHIFT
  14.       CHKALT
  15.       CHKCTRL
  16.  
  17.       No parameters are required
  18.  
  19.    Examples
  20.  
  21.       The following example shows how to adjust a sample autoexec.bat file
  22.       to use the programs for some conditional processing.
  23.  
  24.       ___________________________________________________________
  25.       @ECHO OFF
  26.       SET PATH=C:\DOS;C:\UTILS;C:\NU70
  27.       SET TEMP=C:\DOS
  28.       DOSKEY
  29.  
  30.       rem  Give the user a chance to cancel the network driver load
  31.       ECHO   ***** Hold the SHIFT key to stop the network drivers ******
  32.       chkshft
  33.       IF ERRORLEVEL 1 GOTO TRYNDD
  34.       rem  We'll only get here if the user did NOT press the SHIFT key
  35.       CALL C:\NWCLIENT\STARTNET.BAT
  36.  
  37.       :TRYNDD
  38.       rem  Don't run Norton's Disk Doctor unless the user tells us to
  39.       rem  Note:  this is trickier because we don't want to run by
  40.       rem         default
  41.       ECHO   ***** Hold the ALT key to run Norton Disk Doctor ******
  42.       chkalt
  43.       IF ERRORLEVEL 1 GOTO RUNNDD
  44.       rem  Since they did not press the Alt key, bounce by NDD
  45.       GOTO TAPE
  46.       :RUNNDD
  47.       NDD C: /QUICK
  48.  
  49.       :TAPE
  50.       rem  Give the user a chance to cancel the auto tape backup
  51.       ECHO   ***** Hold the CTRL key to stop the hard drive backup *****
  52.       chkctrl
  53.       IF ERRORLEVEL 1 GOTO END
  54.       CALL C:\TAPE\DRIVEC.BAT
  55.  
  56.       :END
  57.       rem End File
  58.       ___________________________________________________________
  59.  
  60.       The above example shows how to make the default action either do
  61.       something if the user held the key, or ignore something.
  62.  
  63.    Return Codes
  64.  
  65.       0  - The key was not held
  66.       1  - The user did hold the key
  67.  
  68.    Notes
  69.       These programs will ask for confirmation before they assume the user
  70.       meant to press the key.  This should prevent events from taking place
  71.       because a PC was turned on with some paperwork laying on the keyboard!
  72.  
  73.       The user MUST HOLD the keys down.  Pressing the key once and then
  74.       letting go may not be enough to make the program notice the key
  75.       was pressed.
  76.  
  77.       The next versions of these programs will include some parameters to
  78.       change the messages the programs display, the delay time, confirmation,
  79.       etc.  The next version will be posted free of charge for REGISTERED
  80.       users on CompuServe.  You will be notified when they are ready.  
  81.  
  82.    Company Contact
  83.  
  84.       Paradigm Software                      $30 for a single server license
  85.       1333-C Shepard Drive                   $10 for a single user license
  86.       Sterling, VA  20164
  87.       (703) 450-0829
  88.       (703) 450-2683  FAX
  89.