home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 58
/
af058b.adf
/
PV21.lha
/
REXX
/
AddRexx.pvrx
next >
Wrap
Text File
|
1990-07-05
|
1KB
|
46 lines
/* AddRexx.pvrx
Makes selected objects dynamic Rexx objects. Each time these
objects are manipulated by the specified "Actions," the
an ARexx macro will be called.
AddRexx.pvrx first prompts for the name of the macro to be
called. ".PVRX" is assumed, but not required. Then it
prompts for the "Actions" which will intiate the call-
back. These can be any of the PV Rexx commands that
manipulate objects, such as 'CLONE,' 'MOVE,' 'SIZE,'
'ROTATE,' etc.
*/
Address 'ProVector'
options results
/* Obtain exclusive access to ProVector; quit if not possible */
'Lock'
if rc ~= 0 then exit
/* Get the name of the callback routine from the user; quit if they cancel */
'GetStr "Callback:" "OK" "Cancel"'; CallBack = Result
if rc ~= 0 then do
'UnLock'
exit
end
/* Get the list of actions from the user; quit if they cancel */
'GetStr "Actions:" "OK" "Cancel"'; Actions = Result
if rc ~= 0 then do
'UnLock'
exit
end
/* Get the list of selected objects */
'SelectList Sel'; N = Result
do I = 0 to N - 1
'Rexx ' Sel.I ' CallBack ' Actions
end
/* All done! */
'UnLock'