home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
arexx
/
misc_arexx
/
wgui-handler.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-03-30
|
2KB
|
103 lines
/* GiGA-Handler v1.0 by Warp oh' GiGA Prod... Wed Sep 25 23:02:12 1996
1). Open 2-3 Shell windows.
2). Start the WGUI-Handler in one shell.
3). Start the WGUI-Connect in another shell.
I just discovered that it might NOT work at the moment. But look at the code,
and you'll be able to write your own handler...
*/
Trace 'Off'
options results
if ~show('l','rexxsupport.library') then do
call addlib('rexxsupport.library',0,-30,0)
end
If show('P','GIGA') = 1 then do
Say 'GiGA-Handler is already active...'
exit(0)
end
if Openport('GIGA') ~= 1 then do
Say 'Error! - The Public message port, could not be opened...'
exit(10)
end
call addlib "GIGA",-20
Calcount=0
Resta:
Signal on HALT
QuitOK = 0
do while QuitOK = 0
if waitpkt('GIGA') then do
packet=getpkt('GIGA')
event=upper(getarg(packet,0))
Arg1=getarg(packet,1)
Arg2=getarg(packet,2)
Arg3=getarg(packet,3)
say event arg1
if Event='QUIT' then QuitOK=1
if Event='POPREQ' then do
Call Popreq(arg1,arg2)
Say 'PopStr('Arg1')'
Say 'Number of chars: ' Length(Arg1)'.'
Calcount=Calcount+1
Say 'Access count: ' Calcount'.'
end
call reply(packet,0)
end
end
Say 'OK! Are you happy now? Im dead...'
Exit(0)
/* Funcs() starts here */
Halt:
Say "Sorry! I can't quit now! Warp won't let me!!!"
Signal Resta
return 0
PopReq: Parse arg MESS, USERNAME
s = 'Message from ' USERNAME
Call RTezrequest(MESS,'Done!',s,"rt_reqpos =reqpos_centerscr")
return 0
/*
** ^- Pop a requester, with a message...
*/