home *** CD-ROM | disk | FTP | other *** search
- /*
- $VER: MultiViewAppIcon.dopus5 1.0 (19.7.96)
- Written by Edmund Vermeulen (edmundv@grafix.xs4all.nl).
-
- ARexx script for Directory Opus 5.5 to create an AppIcon for MultiView.
- All files dropped on the AppIcon will be displayed with MultiView on the
- Opus screen.
-
- Function : ARexx DOpus5:ARexx/MultiViewAppIcon.dopus5 {Qp} {Qs}
- */
-
- parse arg portname screenname .
- if portname='' then
- portname='DOPUS.1'
- address value portname
- if screenname~='' & screenname~='SCREEN' then
- screenname='PUBSCREEN' screenname
-
- options results
- lf='0a'x
-
- if ~show('l','rexxsupport.library') then
- call addlib('rexxsupport.library',0,-30)
-
- handlername='MultiViewAppIcon.'portname
- if show('p',handlername) then do
- dopus request '"MultiView AppIcon'lf'is already running!" OK'
- exit
- end
- call openport(handlername)
-
- dopus addappicon handlername 'MultiView 1' icon 'SYS:Utilities/MultiView' close local info quotes
- myicon=result
-
- do until event='close' | event='removed'
- if waitpkt(handlername) then do
-
- packet=getpkt(handlername)
- if packet~='00000000'x then do
-
- event=getarg(packet,0)
- id=getarg(packet,1)
- namestr=getarg(packet,2)
- handle=getarg(packet,3)
-
- select
- when event='dropfrom' then
- do while namestr~==''
- parse var namestr '"' thisfile '"' namestr
- if handle>0 then do
- lister query handle path
- thisfile=result||thisfile
- end
- address command 'Run >NIL: <NIL: MultiView' screenname thisfile
- end
- when event='doubleclick' then
- address command 'Run >NIL: <NIL: MultiView' screenname
- when event='info' then
- dopus request '"MultiView AppIcon'lf'Drop files on it to view them." OK'
- otherwise
- nop
- end
-
- call reply(packet,0)
- end
- end
- end
-
- dopus remappicon myicon
- call closeport(handlername)
-