home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / ZapDPI.lha / CheckDPI.adpro next >
Encoding:
Text File  |  1994-01-31  |  1007 b   |  49 lines

  1. /*
  2. ** CheckDPI.adpro
  3. **
  4. ** $VER: CheckDPI.adpro 1.0.1 (17.12.92)
  5. **
  6. ** This ADPro/MorphPlus script calls the ZapDPI program and reports
  7. ** DPI chunk status.
  8. **
  9. ** This script requires ADPro 2.0.0 (or higher) or MorphPlus 1.0.0 (or
  10. ** higher) with ADPro's ZapDPI program to run.
  11. **
  12. ** Copyright © 1992 ASDG Incorporated  All Rights Reserved
  13. */
  14.  
  15.  
  16. ADDRESS "ADPro"
  17. OPTIONS RESULTS
  18.  
  19.  
  20. NEWLINE = '0A'X
  21.  
  22. GETFILES '"Select IFF files to Check:"'
  23. IF (RC ~= 0) THEN DO
  24.     /*
  25.     ** No selection was made
  26.     */
  27.     EXIT
  28. END
  29.  
  30. FileList = ADPRO_RESULT
  31. FileCount = WORDS( FileList )
  32. Counter = 1
  33.  
  34. DO WHILE (Counter <= FileCount)
  35.     ADDRESS COMMAND "ZapDPI" "-c" WORD( FileList, Counter )
  36.     ZapResult = RC
  37.  
  38.     String = WORD( FileList, Counter )
  39.     String = STRIP( String, 'b', '"' )
  40.     IF (ZapResult = 5) THEN
  41.         ErrorString = "contains a DPI chunk."
  42.     ELSE IF (ZapResult = 0) THEN
  43.         ErrorString = "does not contain a DPI chunk."
  44.     ELSE ErrorString = "Error reading or locating file."
  45.     OKAY1 String || NL || ErrorString
  46.  
  47.     Counter = Counter + 1
  48. END
  49.