home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 10
/
aminetcdnumber101996.iso
/
Aminet
/
biz
/
dopus
/
Dopus511.lha
/
dopus_pch.lha
/
ARexx.lha
/
Arexx
/
trap-test.dopus5
< prev
next >
Wrap
Text File
|
1995-06-19
|
898b
|
49 lines
/*
* A simple example of the new "dopus addtrap" and "dopus removetrap" commands
*
*/
address DOPUS.1
options results
options failat 11
dopus front
if ~show('l','rexxsupport.library') then
call addlib('rexxsupport.library',0,-30,0)
call openport('test-handler')
lister new 'c:'
handle=result
lister wait handle
lister set handle handler 'test-handler'
/* install traps */
dopus addtrap copy 'test-handler'
dopus addtrap move 'test-handler'
dopus addtrap delete 'test-handler'
dopus addtrap rename 'test-handler'
do while event ~= 'inactive'
call waitpkt('test-handler')
packet=getpkt('test-handler')
event=getarg(packet,0)
handle=getarg(packet,1)
name=getarg(packet,2)
user=getarg(packet,3)
pathstr=getarg(packet,4)
say 0 event
say 1 handle
say 2 name
say 3 user
say 4 pathstr
call reply(packet,0)
end
/* remove all traps for my handler */
dopus remtrap '*' 'test-handler'