/* ** SaveAsIFF.fred.pre ** ** $VER: SaveAsIFF.fred.pre 1.3.0 (24.10.93) ** ** If the SaveAsIFF.fred script appears in the InvokeADPro list, ** this program will ask the user to enter the save parameters for the ** IFF'd file. These parameters will be stuffed into REXX clips. ** ** If they fail to answer, the InvokeADPro list will be aborted. ** ** Clips Exported: ** FREDIFFSaveType - Image type to save ** FREDIFFFNameSelect - String describing how the filename ** should be modified ** FREDIFFSeqFileSelect - Name of sequence file created ** ** NOTE: Clip names are case sensitive. ** ** This script requires FRED v1.4.0 (or higher) to run. Also required is ** ADPro v2.5.0 (or higher). ** ** Copyright © 1992-1993 ASDG, Incorporated ** All Rights Reserved */ ADDRESS "ADPro" OPTIONS RESULTS PARSE ARG NumberOfCells NumberOfFrames NL = '0A'X SQ = '27'X DQ = '22'X TRUE = 1 FALSE = 0 /* ** Ask the user which type of data should be saved out. */ ADPRO_TO_FRONT OKAYN '"SaveAsIFF.fred"' '"Select save data type"' '"Cropped Screen|Image|Raw|Cancel"' IF (RC = 0) THEN DO SCREEN_TO_FRONT "FRED" EXIT 10 END ELSE IF (RC = 1) THEN SaveType = "SCREEN" ELSE IF (RC = 2) THEN SaveType = "IMAGE" ELSE IF (RC = 3) THEN SaveType = "RAW" /* ** Specify whether the given filename should be reused for the ** IFF'd filename. */ CALL "FREDSCRIPTS:FREDFunctions/ModifyFilenameSelect" '"'".iff"'"' 4 1 10 FNameSelect = RESULT IF (RESULT = 10) THEN EXIT RESULT CALL "FREDSCRIPTS:FREDFunctions/SeqFileSelect" SeqFileSelect = RESULT IF (RESULT = 10) THEN EXIT RESULT /* ** Update the clips. */ SETCLIP( "FREDIFFSaveType", SaveType ) SETCLIP( "FREDIFFFNameSelect", FNameSelect ) SETCLIP( "FREDIFFSeqFileSelect", SeqFileSelect ) EXIT 0