home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enigma Amiga Life 109
/
EnigmaAmiga109CD.iso
/
software
/
grafica
/
redfix
/
rexx
/
autofx
/
saverenderedas_newicon.ifx
< prev
next >
Wrap
Text File
|
1999-11-12
|
2KB
|
65 lines
/*
* $VER: SaveRenderedAs_NewIcon.ifx (AutoFX Arexx script) 1.0 (12.11.99) ® 1999 by Przemyslaw 'SENSEI' Gruchala
*
* Arexx script for AutoFX. Made for the REDFiX modules package.
*
* Based on the SaveRenderedAs_ILBM.ifx written by Thomas Krehbiel
*
* Save rendered image as NewIcon. Buffer must not be CMAP!
*
* Inputs:
* Word(Arg(1),1) = Frame number (1 - N)
* Word(Arg(1),2) = Main filename ("-" if not specified)
* Word(Arg(1),3) = Swap filename ("-" if not specified)
* Word(Arg(1),4) = Sequence number (?)
* Word(Arg(1),5) = Total number of frames (N)
*
* Returns:
* 0 if successful, non-zero on failure
*
*/
OPTIONS RESULTS
/* gracefully exit if no buffer */
GetMain
IF rc ~= 0 THEN EXIT 0
framenum = Word(Arg(1),1)
mainname = Word(Arg(1),2)
swapname = Word(Arg(1),3)
seq = Word(Arg(1),4)
framemax = Word(Arg(1),5)
base = 'Autofx_SaveRenderedAsNewIcon_'
path = GETCLIP(base||'Path'||seq)
ext = GETCLIP(base||'Ext'||seq)
gui = GETCLIP(base||'GUI'||seq)
i = POS('*', ext)
IF i > 0 THEN ext = LEFT(ext,i-1) || RIGHT('00000'||framenum,5) || SUBSTR(ext,i+1)
outfile = mainname||ext
IF path ~= "" THEN DO
i = LASTPOS('/',mainname)
IF i = 0 THEN i = LASTPOS(':',mainname)
IF i = 0 THEN
file = mainname
ELSE
file = SUBSTR(mainname,i+1)
IF RIGHT(path,1) ~= ':' THEN path = path||'/'
outfile = path||file||ext
END
SaveRenderedAs 'Icon/NewIcon' '"'outfile'"' gui
/* Nie wyswietlaj GUI za nastepnym razem */
CALL SETCLIP(base||'GUI'||seq, "NOSHOWGUI")
EXIT rc