home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / util / boot / peekqual / peekqual.doc < prev    next >
Encoding:
Text File  |  1994-08-27  |  3.3 KB  |  88 lines

  1. Welcome to this little utility.  First of all, a few words of legal things:
  2.  
  3. This  program  and  all  related  files  are copyrighted by the author, Frédéric
  4. Delacroix,  and  cannot  be  sold  for  profit.   They are released as FreeWare,
  5. meaning  everyone  is allowed to use and copy the program free of charge as long
  6. as all files are spread together and remain unchanged.  A small fee for copy and
  7. mail is allowed.
  8.  
  9. The  reason  for  this  program  to be is that I recently had trouble in finding
  10. which  of  the  programs  launched in my user-startup was sometimes crashing the
  11. system.  I wrote a special version of the user-startup that asked before running
  12. all programs, and thought it would be great to have a program allowing to switch
  13. the files automatically when a key was hit.
  14.  
  15. The  best candidates for those keys were of course the qualifiers, since they do
  16. not  interfere  with the output window.  Moreover, there is a new (V36) function
  17. in  the input.device that would make it easy to test:  PeekQualifier().  So here
  18. is this program, which does not even require a window to be opened to work.  The
  19. program fits in one disk block, and is pure, meaning it can be made resident.
  20.  
  21. To use PeekQual, you must have kickstart 2.04 or higher.  It will only work from
  22. CLI, the template is as follows:
  23.  
  24. PeekQual ONQUAL,OFFQUAL
  25.  
  26.     Each  of the arguments, ONQUAL and OFFQUAL, should be a word made of the
  27. following  letters  (I've tried to respect this rule:  lower case for left keys,
  28. and upper case for right ones):
  29.  
  30.     s:    left Shift
  31.     S:    right Shift
  32.     c:    Control
  33.     C:    Caps lock
  34.     a:    left Alt
  35.     A:    right Alt
  36.     g:    left amiGa
  37.     G:    right amiGa
  38.     b:    left mouse Button
  39.     B:    right mouse Button
  40.     m:    Middle mouse button
  41.  
  42.     The  program does the following:  it PeekQualifier()s and then tests the
  43. result:  if all keys given in the ONQUAL argument are pressed and all keys given
  44. in  the  OFFQUAL argument are NOT be pressed, then the program returns WARN (5),
  45. else  it returns OK (0).  The result can then be tested with the IF WARN command
  46. in  a  script  file.   All qualifiers given neither in ONQUAL nor in OFFQUAL are
  47. ignored.
  48.  
  49. Example, in your startup-sequence:
  50.  
  51. PeekQual CSs
  52. IF WARN
  53.  Execute S:User-Startup.Debug
  54. ELSE
  55.  Execute S:User-Startup
  56. ENDIF
  57.  
  58.     will  execute the normal user-startup file, unless you are pressing caps
  59. lock  and  both  shift  keys  at  the  time PeekQual is run, in which case it is
  60. user-startup.debug that is run.
  61.  
  62. Another example, at the end of your startup-sequence:
  63.  
  64. execute S:User-Startup
  65. LoadWB -DEBUG
  66. PeekQual OFFQUAL=G
  67. IF WARN
  68.  EndCLI
  69. ENDIF
  70.  
  71.     This  will  end  normally  the startup-sequence (and close the window if
  72. open),  unless  you  are  pressing the right amiga key, in which case the window
  73. remains open for you to use as a normal Shell.
  74.  
  75.     The  source  is  provided in this archive, and is copyrighted as are the
  76. other files, but you can use it for whatever you want, as long as you mention my
  77. name.   By  the way, you can send me whatever you want:  Bug reports, postcards,
  78. nice  letters,  money, PD programs, Amigas 4000, CD-Rom drives, etc...  All will
  79. receive  an answer (especially for a 4000 :-), except swapper letters which fall
  80. from the left of my desk down to the trashcan.
  81.  
  82.     Frédéric Delacroix
  83.     5 rue d'Artres
  84.     59269 Quérénaing
  85.     FRANCE        (maybe on Internet by oct 94)
  86.  
  87. And, above all, continue to support the amiga, especially now !
  88.