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

  1. /*
  2. ** FieldBuster.fred.pre
  3. **
  4. ** $VER: FieldBuster.fred.pre 1.3.0 (5.11.93)
  5. **
  6. ** If the FieldBuster.fred script appears in the InvokeADPro list,
  7. ** this program will ask the user how to split each frame into its
  8. ** fields.
  9. **
  10. ** Clips Exported:
  11. **    FREDEvenFieldExt    -    Filename extension for even fields
  12. **    FREDOddFieldExt        -    Filename extension for odd fields
  13. **
  14. ** NOTE: Clip names are case sensitive.
  15. **
  16. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  17. ** ADPro v2.5.0 (or higher).
  18. **
  19. ** Copyright © 1992-1993 ASDG, Incorporated
  20. ** All Rights Reserved
  21. */
  22.  
  23.  
  24. ADDRESS "ADPro"
  25. OPTIONS RESULTS
  26.  
  27. PARSE ARG NumberOfCells NumberOfFrames
  28.  
  29. NL = '0A'X
  30. SQ = '27'X
  31. DQ = '22'X
  32. TRUE  = 1
  33. FALSE = 0
  34.  
  35.  
  36. /*
  37. ** Ask the user the filename extensions to use for odd and even fields.
  38. */
  39.  
  40. continue = 0
  41. DO UNTIL (continue = 1)
  42.     ADPRO_TO_FRONT
  43.  
  44.     GETSTRING '"Extension for even fields"' ".0"
  45.     EvenFieldExt = ADPRO_RESULT
  46.     IF (RC = 0) THEN DO
  47.         IF (EvenFieldExt = "") THEN DO
  48.             ADPRO_TO_FRONT
  49.  
  50.             OKAYN '"FieldBuster.fred"' '"An extension is required."' '"Retry|Cancel"'
  51.             IF (RC = 0) THEN
  52.                 EXIT 10
  53.         END
  54.         ELSE IF (INDEX( EvenFieldExt, "." ) ~= 1) THEN DO
  55.             text = "You must enter an extension" || NL ||,
  56.                 "in the form of:  .<extension>"
  57.  
  58.             ADPRO_TO_FRONT
  59.  
  60.             OKAYN '"FieldBuster.fred"' '"'text'"' '"Retry|Cancel"'
  61.             IF (RC = 0) THEN
  62.                 EXIT 10
  63.         END
  64.         ELSE
  65.             continue = 1
  66.     END
  67.     ELSE
  68.         EXIT 10
  69. END
  70.  
  71. continue = 0
  72. DO UNTIL (continue = 1)
  73.     ADPRO_TO_FRONT
  74.  
  75.     GETSTRING '"Extension for odd fields"' ".1"
  76.     OddFieldExt = ADPRO_RESULT
  77.     IF (RC = 0) THEN DO
  78.         IF (OddFieldExt = "") THEN DO
  79.             ADPRO_TO_FRONT
  80.  
  81.             OKAYN '"FieldBuster.fred"' '"An extension is required."' '"Retry|Cancel"'
  82.             IF (RC = 0) THEN
  83.                 EXIT 10
  84.         END
  85.         ELSE IF (INDEX( OddFieldExt, "." ) ~= 1) THEN DO
  86.             text = "You must enter an extension" || NL ||,
  87.                 "in the form of:  <extension>"
  88.  
  89.             ADPRO_TO_FRONT
  90.  
  91.             OKAYN '"FieldBuster.fred"' '"'text'"' '"Retry|Cancel"'
  92.             IF (RC = 0) THEN
  93.                 EXIT 10
  94.         END
  95.         ELSE
  96.             continue = 1
  97.     END
  98.     ELSE
  99.         EXIT 10
  100. END
  101.  
  102. SCREEN_TO_FRONT "FRED"
  103.  
  104.  
  105. /*
  106. ** Update the clips.
  107. */
  108.  
  109. SETCLIP( "FREDOddFieldExt", OddFieldExt )
  110. SETCLIP( "FREDEvenFieldExt", EvenFieldExt )
  111.  
  112. EXIT 0
  113.