home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Amiga
/
Workbench
/
DOpus
/
MPEGA-GUIplay.lha
/
MPEGA-convert.dopus5
next >
Wrap
Text File
|
1998-05-06
|
3KB
|
168 lines
/* $VER: MPEGA-convert.dopus5 1.7 (06 May 1998)
⌐1998 by mike@kily.ruhr.de (http://kily.home.pages.de)
DOPUS5.5+ AREXX Script for MPEGA-Soundconvert to AIFF
with ProgressBar-GUI with timecounter.
needs:
DOPUS 5.5+
MPEGA 3.3
RexxMaster (ARexx) running
mounted PIPE: device > SYS:DEVS/DOSDRIVERS/PIPE
kill > Task breaker tool by Magnus Holmgren (included)
description:
A DOPUS GUI for the Great MPEGA player by Stephane TAVENARD.
displays Name/MPEG-Quality/Time in a DOPUS PROGRESS Window.
it shows the runtime on a proggressbar and a timecounter.
installation:
as Button,Menu,...
NO Parameters, only select: <AREXX> Dopus5:ARexx/MPEGA-Convert.dopus5
configuration:
check/change the mpega startup parameters in this script.
EmailWare:
this script ist Email-ware,
please mail me your favourit Internet-Site !
*/
OPTIONS RESULTS
convertmode="-WsT -p-30"
PARSE ARG portname' 'handle' 'file
IF portname='' THEN portname='DOPUS.1'
ADDRESS VALUE portname
IF handle="" THEN DO
LISTER QUERY SOURCE
handle=result
IF RC~=0 THEN DO
DOPUS REQUEST '"no Source-directory selected !?!" OOPS!'
EXIT
END
LISTER QUERY Handle selfiles stem files.
IF files.count=0 THEN DO
DOPUS REQUEST '"no MPEG sound-files selected !?!" OOPS!'
EXIT
END
END
IF file~="" then DO
files.0=compress(file,'"')
files.count=1
END
LISTER QUERY Handle path
pfad=result
LISTER SET Handle BUSY ON
LISTER SET Handle newprogress name info bar abort
DO j = 0 TO files.count-1
IF index(upper(files.j),".MP") >1 then do
LISTER SET Handle NEWPROGRESS NAME "Name: "files.j
LISTER SET Handle NEWPROGRESS INFO "00:00 / 00:00 / decoding MPEG sound..."
file='"'pfad||files.j'"'
pos=lastpos('.',files.j)
fname=left(files.j,pos-1)
file='"'pfad||files.j'"'
file2='"'pfad||fname'.WAV"'
ADDRESS COMMAND 'RUN >NIL: <NIL: mpega 'convertmode' -T 'file' 'file2' >PIPE:mpegout'
CALL Open('mpegout','PIPE:mpegout','r')
string = ReadLn('mpegout')
string=Text( string )
parse var string version "[680"CPU "(C)"dummy
version=version" "CPU
LISTER SET Handle NEWPROGRESS title j+1' / 'files.count' - 'version
DO until dummy=""
dummy = ReadLn('mpegout')
END
string = ReadLn('mpegout')
string=Text( string )
parse var string dummy"MPEG"MTYPE
MPGMODE="MPEG"MTYPE
string = ReadLn('mpegout')
string=Text( string )
parse var string dummy": "pm":"ps
ptotal=pm*60+ps
secs=0
LISTER SET Handle NEWPROGRESS bar ptotal 0
DO UNTIL Eof('mpegout')
time=ReadCh('mpegout',29)
secs=secs+1
if index(time,"err")>0 then dopus request "error"'0a'x||time
time=left(right(time,10),5)
if time="" then time=" End."
LISTER QUERY Handle abort
skip=result
IF skip=1 THEN DO
ADDRESS COMMAND 'kill MPEGA >nil:'
if stop<5 & secs<5 then do
LISTER REFRESH Handle
LISTER SET Handle BUSY OFF
CALL Close('mpegout')
EXIT
end
stop=secs
dummy=ReadCh('mpegout',256)
END
ELSE DO
LISTER SET Handle NEWPROGRESS INFO pm":"ps" / "time" / "MPGMODE
LISTER SET Handle NEWPROGRESS bar ptotal secs
END
END
LISTER CLEAR Handle abort
CALL Close('mpegout')
LISTER SELECT Handle '"'files.j'"' OFF
LISTER REFRESH Handle
END
END
LISTER SET Handle BUSY OFF
EXIT
TEXT:
PROCEDURE
TEXT=Arg( 1 )
esc2=1
do until esc1=0
esc1=Verify(text,'1b'x,'m')
if esc1~=0 then text=delstr(text,esc1,1)
parse var text d1'[1m'd2'[22m'd3
text=d1||d2||d3
end
RETURN TEXT