home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
opus
/
v4
/
sortdopus
/
dopus
/
arexx
/
sortdopus.dopus
Wrap
Text File
|
1996-09-03
|
2KB
|
92 lines
/*
Short: Select sort method/direction for DOpus4
Uploader: Dave Clarke <4wd@connexus.apana.org.au>
Author: Dave Clarke <4wd@connexus.apana.org.au>
Type: biz/dopus
Version: 1.0
Distribution: Aminet
$VER: SortDOpus.dopus V1.0 (13.4.94)
Script to change the sort item and direction in DirOpus. V4.11
(Only operates on the active window)
You can sort on: Name, Size, Protection flags, Date, File comment, Filetype.
And also in the reverse direction, (Z->A).
Installation: Create the amount of buttons/menuitems you need
with the following options.
ARexx SortDOpus.dopus {type} [{direct}]
Flags.. Run Asynchronously
where: {type} = sort item -> N = Name
S = Size
P = Protection flags
D = Date
C = File comment
F = Filetype
{direct} = Direction -> R = Reverse
Anything else is normal, (eg. A->Z)
eg. SortDOpus.dopus P R will sort on protection flags in reverse order.
*/
trace off
options results
signal on error
parse arg type direct .
address 'DOPUS.1'
'status 3'
A_Win=RESULT
'query sortflags'
S_Flag=RESULT
if direct='R' then do
N_Flag=c2d(bitset(d2c(S_Flag),A_Win))
dir='Reverse'
end
else do
N_Flag=c2d(bitclr(d2c(S_Flag),A_Win))
dir='Normal'
end
'modify sortflags 'N_Flag
select
when type='N' then do
'modify sortmethod -1 0'
topline='Name'
end
when type='S' then do
'modify sortmethod -1 1'
topline='Size'
end
when type='P' then do
'modify sortmethod -1 2'
topline='Protection'
end
when type='D' then do
'modify sortmethod -1 3'
topline='Date'
end
when type='C' then do
'modify sortmethod -1 4'
topline='Comment'
end
when type='F' then do
'modify sortmethod -1 5'
topline='Filetype'
end
otherwise
end
rescan
toptext dir topline
exit 0