home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Converter / AD2.55-C.DMS / in.adf / FREDScripts.lha / FREDFunctions / SeqFileAppend < prev    next >
Encoding:
Text File  |  1994-01-31  |  1.6 KB  |  83 lines

  1. /*
  2. ** SeqFileAppend
  3. **
  4. ** $VER: SeqFileAppend 1.1.0 (5.11.93)
  5. **
  6. ** This ARexx script contains a function which appends the given cell information
  7. ** to an existing FRED sequence (.seq) file.  This script must be used in conjunction
  8. ** with (and called after calling) the SeqFileSelect script.
  9. **
  10. ** INPUTS
  11. **    SeqFName -- filename of the sequence file to append to.
  12. **    CellFName -- filename of the cell to append.
  13. **    CellLength -- number of frames represented by this cell.
  14. **
  15. ** RETURN
  16. **    Nothing
  17. **
  18. ** This script should work with current versions of ARexx.
  19. **
  20. ** This script requires ADPro v2.5.0 (or higher).
  21. **
  22. ** Copyright © 1993 ASDG, Incorporated
  23. ** All Rights Reserved
  24. */
  25.  
  26.  
  27. /*ADDRESS "ADPro"*/
  28. OPTIONS RESULTS
  29.  
  30.  
  31. NL = '0A'X
  32. SQ = '27'X
  33. DQ = '22'X
  34. TRUE  = 1
  35. FALSE = 0
  36.  
  37.  
  38. PARSE ARG '"'SeqFName'"' '"'CellFName'"' CellLength
  39. /*
  40. address "ADPro" OKAY1 SeqFName || NL || CellFName || NL || CellLength
  41. */
  42.  
  43. IF (SeqFName = "???") THEN
  44.     EXIT 0
  45.  
  46. ADDRESS "ADPro" XSIZE
  47. CellWidth = ADPRO_RESULT
  48.  
  49. ADDRESS "ADPro" YSIZE
  50. CellHeight = ADPRO_RESULT
  51.  
  52. CALL "FREDSCRIPTS:FREDFunctions/FileOnly" CellFName
  53. CellNodeName = RESULT
  54.  
  55. SeqLine = CellFName || "    " ||,
  56.     CellNodeName || "    " ||,
  57.     CellLength || "    " ||,
  58.     CellWidth || ", " ||,
  59.     CellHeight
  60.  
  61. ADDRESS "ADPro"
  62.  
  63. IF (OPEN( 'SeqFH', SeqFName, 'Append' ) ~= 0) THEN DO
  64.     IF (WRITELN( 'SeqFH', SeqLine ) = 0) THEN DO
  65.         ADPRO_TO_FRONT
  66.         OKAY1 "Error appending to" || NL ||,
  67.             SeqFName || NL || NL ||,
  68.             "Aborting."
  69.         SCREEN_TO_FRONT "FRED"
  70.         EXIT 10
  71.     END
  72.  
  73.     CLOSE( 'SeqFH' )
  74. END
  75. ELSE DO
  76.     ADPRO_TO_FRONT
  77.     OKAY1 "Error opening sequence file"
  78.     SCREEN_TO_FRONT "FRED"
  79.     EXIT 10
  80. END
  81.  
  82. EXIT 0
  83.