/*
** sAPpegs2M.rexx
**
** $VER: sAPpegs2M.rexx 2.0.3 (25.08.93)
**
** ARexx script generated by T-Rexx Professional 2.0.1
*/


Switcher = 'ToasterARexx.port'  /* address Switcher's ARexx port */

if ~show('L','rexxsupport.library') then
    call addlib('rexxsupport.library',0,-30)
if ~show('L',Switcher) then
    call addlib(Switcher,-1)



Trap = Switcher(TOSW)
Trap = Switcher(LDTP)
address command 'run Rx "Switcher(STTP)"'
TDelay(0,0,2,0)
address 'DigiPaint' 'Sa24'
address 'DigiPaint' 'Dnam' || 'Ram Disk:'
address 'DigiPaint' 'Fnam' || 'SMtempfile'
address 'DigiPaint' 'Okls'
address 'DigiPaint' 'Squt'
Trap = Switcher(TOWB)
Address Helm.1 screentofront
Address 'ADPro'
OPTIONS RESULTS
address 'ADPro' ADPRO_TO_FRONT
LFORMAT "IFF"
LOAD "RAM:SMtempfile"
GETFILE '"Save JEPG file from TP CroutonTools"' 
IF (RC ~= 0) THEN
EXIT
TheFile = ADPRO_RESULT
SFORMAT "JPEG" 
SAVE TheFile RAW
Address Helm.1 screentofront


/*  End of the command list  */


TDelay:
arg hours, minutes, seconds, frames

    total=0

    if hours > 0 then total=(hours * 60 * 60 * 50)
    if minutes > 0 then total=total + (minutes * 60 * 50)
    if seconds > 0 then total=total + (seconds * 50)
    if frames > 0 then total=total + ((frames + 1) / 50 * 100)
    if total > 50 then total=total % 1
    if minutes > 0 then total=total - (100 * minutes)

    do while total >= 50
        say '08'x
        Delay(50)
        total=total-50
    end

    if total > 0 then Delay(total)
return 0
