home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDGE1_704.DMS / in.adf / Edge_Rexx.lha / NewKey.edge < prev    next >
Encoding:
Text File  |  1993-10-27  |  643 b   |  45 lines

  1.  
  2. /*
  3. ** $VER: NewKey.edge 1.2 (Sunday 19-Sep-93 20:19:52)
  4. **
  5. ** Add a new keyboard command
  6. **
  7. ** Written by Thomas liljetoft
  8. */
  9.  
  10.  
  11. options results
  12.  
  13. /* get the users error-report level */
  14.  
  15. getenvvar _ge_errlevel
  16. errlevel = result
  17.  
  18. /* ask for the key-description to use */
  19.  
  20. 'requestkey' title '"Enter new key."'
  21. if RC == 0 then do
  22.  
  23.     /* ok, now ask for the command */
  24.  
  25.     key = result
  26.     'requeststring' title '"Enter command."'
  27.     if RC == 0 then do
  28.  
  29.         /* add the new command */
  30.  
  31.         'keyboard' key result
  32.  
  33.         end
  34.     end
  35.  
  36. if RC >= errlevel then do
  37.  
  38.     /* something went wrong enought to be reported so report */
  39.  
  40.     'fault'
  41.     'requestnotify' result
  42.     end
  43.  
  44. exit(0)
  45.