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

  1.  
  2. /*
  3. ** $VER: BindButton.edge 1.2 (Sunday 08-Aug-93 02:32:06)
  4. **
  5. ** Bind a macro to a mousebutton click
  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 a button-description to use */
  19.  
  20. 'requeststring' title '"Enter Button, Qualifier & QualMask."' '"BUTTON=*"*" Q=*"*" QM=*"*""'
  21. if RC == 0 then do
  22.  
  23.     /* ok so far, now ask for a macro to bind to the button */
  24.  
  25.     button = result
  26.     'requestfile' title '"Select macro..."' path '""' file '""' getdir
  27.     if RC == 0 then do
  28.  
  29.     /* okidoki, add to the mouse-button-command-list */
  30.     
  31.         'mousebutton' button 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.