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

  1.  
  2. /*
  3. ** $VER: EditKey.edge 1.2 (Sunday 19-Sep-93 13:57:38)
  4. **
  5. ** Edit a 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 edit */
  19.  
  20. 'requestkey' title '"Enter key to edit"'
  21. if RC == 0 then do
  22.  
  23.     /* ok, now get the command currently installed */
  24.  
  25.     key = result
  26.     'keyboard' key ask
  27.     if RC == 0 then do
  28.  
  29.     /* ask for a new command, but supply the current as 'default' */
  30.  
  31.         def = result
  32.         'requeststring' title '"Enter new definition."' default '"'def'"'
  33.         if RC == 0 then do
  34.  
  35.         /* change to the new command */
  36.  
  37.             'keyboard' key force result
  38.  
  39.             end
  40.         end
  41.     end
  42.  
  43. if RC >= errlevel then do
  44.  
  45.     /* something went wrong enought to be reported so report */
  46.  
  47.     'fault'
  48.     'requestnotify' result
  49.     end
  50.  
  51. exit(0)
  52.