home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 58 / af058b.adf / PV21.lha / REXX / AddRexx.pvrx next >
Text File  |  1990-07-05  |  1KB  |  46 lines

  1. /* AddRexx.pvrx
  2.  
  3.    Makes selected objects dynamic Rexx objects. Each time these
  4.     objects are manipulated by the specified "Actions," the
  5.     an ARexx macro will be called.
  6.    AddRexx.pvrx first prompts for the name of the macro to be 
  7.     called. ".PVRX" is assumed, but not required. Then it
  8.     prompts for the "Actions" which will intiate the call-
  9.     back. These can be any of the PV Rexx commands that
  10.     manipulate objects, such as 'CLONE,' 'MOVE,' 'SIZE,'
  11.     'ROTATE,' etc.
  12.  
  13. */
  14.  
  15. Address 'ProVector'
  16. options results
  17.  
  18. /* Obtain exclusive access to ProVector; quit if not possible */
  19. 'Lock'
  20. if rc ~= 0 then exit
  21.  
  22. /* Get the name of the callback routine from the user; quit if they cancel */
  23. 'GetStr "Callback:" "OK" "Cancel"';        CallBack = Result
  24. if rc ~= 0 then do
  25.     'UnLock'
  26.     exit
  27. end
  28.  
  29.  
  30. /* Get the list of actions from the user; quit if they cancel */
  31. 'GetStr "Actions:" "OK" "Cancel"';        Actions = Result
  32. if rc ~= 0 then do
  33.     'UnLock'
  34.     exit
  35. end
  36.  
  37.  
  38. /* Get the list of selected objects */
  39. 'SelectList Sel';    N = Result
  40. do I = 0 to N - 1
  41.     'Rexx ' Sel.I ' CallBack ' Actions
  42. end
  43.  
  44. /* All done! */
  45. 'UnLock'
  46.