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

  1.  
  2. /*
  3. ** $VER: EditButton.edge 1.1 (Sunday 08-Aug-93 02:35:43)
  4. **
  5. ** Edit a mousebutton 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 mouse button to edit */
  19.  
  20. 'requeststring' title '"Enter Button, Qualifier & QualMask."' '"BUTTON=*"*" Q=*"*" QM=*"*""'
  21. if RC == 0 then do
  22.  
  23.     /* ok, now get the command currently installed */
  24.  
  25.     button = result
  26.     'mousebutton' button 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.             'mousebutton' button 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.