Priest of the Order of the Butterfly
Posts: 741 from 2003/2/24
Ok, today I've put some time into Mimetypes,too
AMTD
1
Name HollywoodScript
Type text/hwscript
Match
Name #?.hws
End
Action
Name Edit ...
Event DoubleClick
Command AMIGADOS run >nil: rxs sys:utilities/miao/MUINDIC %sp
End
Action
Name Start ...
Event Menu
Command AMIGADOS run >nil: Hollywood:system/Hollywood window %sp
End
End
AMTD
1
Name Archive
Type archive/lzx
Match $4C5A58
OR
Name #?.lzx
End
Action
Name Extract LZX
Event DoubleClick
Command AMIGADOS run >nil: c:lzx x %sp dh2:
End
End
AMTD
1
Name MP3
Type sound/mp3
Match $494433
OR
Match $FFFA92
OR
Match $FFFB50
OR
Match $FFFB90
OR
Name #?.mp3
End
Action
Name Play ...
Event DoubleClick
Command AMIGADOS run >nil: rx songpl %sp
End
End
The arexx-script songpl is used to
send the file to songplayer and makes sure
only this one file is played
PS: Not one of my best
It's looking
for the env-variable "Toolbar.Songplayer"
so you need to
setenv save Toolbar.Songplayer User:Sound/songplayer/SongPlayer
(Use your path) ...
/* */
parse arg name
if ~show('L',"rexxtricks.library") then call addlib('rexxtricks.library',0,-30,0)
if name = '' then do
address command
'requestfile NOICONS POSITIVE=Play >t:songpl.tmp'
call readfile('t:songpl.tmp',file)
name = file.1
end
signal on error
call checksp()
call checkst()
if mode = 'PLAY' then call spm('STOP')
call spm('OPEN' name)
call spm('PLAY')
exit
checksp:
if show('p','SONGPLAYER.1') then return
songplayer = getenv('Toolbar.Songplayer')
if songplayer = '' then songplayer = 'SongPlayer:SongPlayer'
if exists(songplayer) then do
address command
line = 'run >nil:' songplayer 'AHI=0x0012000c ICONIFIED GUI'
line
do while ~show('P','SONGPLAYER.1')
address command 'wait 2'
end
if ~show('P','SONGPLAYER.1') then exit1('Songplayer not launched')
end
else call exit1('Songplayer not found')
return
spm:
parse arg mode
address 'SONGPLAYER.1'
mode
return
checkst:
address 'SONGPLAYER.1'
GET_STATE
spstatus = result
return
error:
exit1:
parse arg ermsg
if ermsg = '' then ermsg = 'Fatal Error'
say ermsg