home *** CD-ROM | disk | FTP | other *** search
- /*
- * $VER: SaveBufferAs.ifx.pre 2.5 (11.04.96)
- * Copyright © 1992-1996 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Save main buffer.
- *
- * Inputs:
- * Word(Arg(1),1) = Sequence number (?)
- * Word(Arg(1),2) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- base = 'Autofx_SaveBufferAs_'
- seq = WORD(ARG(1),1)
-
- lastpath = GETCLIP(base||'Path'||seq)
- lasttype = GETCLIP(base||'Type'||seq)
- lastopts = GETCLIP(base||'Opts'||seq)
- lastext = GETCLIP(base||'Ext'||seq)
-
- IF lastext = "" & lastpath = "" THEN lastext = ".new"
-
- IF lastpath = "" THEN DO
- GetPrefs SavePath
- lastpath = result
- END
-
- IF lasttype = "" THEN lasttype = "ILBM"
-
- Gadget.1 = 'STRING 120 5 200 14 "Output Path:" "'lastpath'"'
- Gadget.2 = 'STRING 120 20 80 14 "Output Format:" "'lasttype'"'
- Gadget.3 = 'STRING 120 35 200 14 "Format Options:" "'lastopts'"'
- Gadget.4 = 'FILEREQ 321 5 20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
- Gadget.5 = 'TEXT 206 23 1 1 "EG: ILBM, JPEG, TIFF" 1'
- Gadget.6 = 'STRING 120 50 200 14 "New Extension:" "'lastext'"'
- Gadget.7 = 'TEXT 120 66 1 1 "(** = current frame number)" 1'
- Gadget.8 = 'END'
-
- NewComplexRequest '"Save Buffer As"' Gadget 360 84
- IF rc ~= 0 THEN EXIT rc
-
- lastpath = result.1
- lasttype = result.2
- lastopts = result.3
-
- CALL SETCLIP(base||'Path'||seq, lastpath)
- CALL SETCLIP(base||'Type'||seq, lasttype)
- CALL SETCLIP(base||'Opts'||seq, lastopts)
- CALL SETCLIP(base||'Ext'||seq, result.6)
-
- EXIT
-