home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / FREDScripts.lha / FREDSavers / SaveAsIFF.fred.pre < prev    next >
Encoding:
Text File  |  1994-01-31  |  1.7 KB  |  84 lines

  1. /*
  2. ** SaveAsIFF.fred.pre
  3. **
  4. ** $VER: SaveAsIFF.fred.pre 1.3.0 (24.10.93)
  5. **
  6. ** If the SaveAsIFF.fred script appears in the InvokeADPro list,
  7. ** this program will ask the user to enter the save parameters for the
  8. ** IFF'd file.  These parameters will be stuffed into REXX clips.
  9. **
  10. ** If they fail to answer, the InvokeADPro list will be aborted.
  11. **
  12. ** Clips Exported:
  13. **    FREDIFFSaveType        -    Image type to save
  14. **    FREDIFFFNameSelect    -    String describing how the filename
  15. **                    should be modified
  16. **    FREDIFFSeqFileSelect    -    Name of sequence file created
  17. **
  18. ** NOTE: Clip names are case sensitive.
  19. **
  20. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  21. ** ADPro v2.5.0 (or higher).
  22. **
  23. ** Copyright © 1992-1993 ASDG, Incorporated
  24. ** All Rights Reserved
  25. */
  26.  
  27.  
  28. ADDRESS "ADPro"
  29. OPTIONS RESULTS
  30.  
  31. PARSE ARG NumberOfCells NumberOfFrames
  32.  
  33. NL = '0A'X
  34. SQ = '27'X
  35. DQ = '22'X
  36. TRUE  = 1
  37. FALSE = 0
  38.  
  39.  
  40. /*
  41. ** Ask the user which type of data should be saved out.
  42. */
  43.  
  44. ADPRO_TO_FRONT
  45.  
  46. OKAYN '"SaveAsIFF.fred"' '"Select save data type"' '"Cropped Screen|Image|Raw|Cancel"'
  47. IF (RC = 0) THEN DO
  48.     SCREEN_TO_FRONT "FRED"
  49.     EXIT 10
  50. END
  51. ELSE IF (RC = 1) THEN
  52.     SaveType = "SCREEN"
  53. ELSE IF (RC = 2) THEN
  54.     SaveType = "IMAGE"
  55. ELSE IF (RC = 3) THEN
  56.     SaveType = "RAW"
  57.  
  58.  
  59. /*
  60. ** Specify whether the given filename should be reused for the
  61. ** IFF'd filename.
  62. */
  63.  
  64. CALL "FREDSCRIPTS:FREDFunctions/ModifyFilenameSelect" '"'".iff"'"' 4 1 10
  65. FNameSelect = RESULT
  66. IF (RESULT = 10) THEN
  67.     EXIT RESULT
  68.  
  69. CALL "FREDSCRIPTS:FREDFunctions/SeqFileSelect"
  70. SeqFileSelect = RESULT
  71. IF (RESULT = 10) THEN
  72.     EXIT RESULT
  73.  
  74.  
  75. /*
  76. ** Update the clips.
  77. */
  78.  
  79. SETCLIP( "FREDIFFSaveType", SaveType )
  80. SETCLIP( "FREDIFFFNameSelect", FNameSelect )
  81. SETCLIP( "FREDIFFSeqFileSelect", SeqFileSelect )
  82.  
  83. EXIT 0
  84.