/*
** ZapDPI.adpro
**
** $VER: ZapDPI.adpro 1.0.1 (17.12.92)
**
** This ADPro/MorphPlus script calls the ZapDPI program and forcibly
** changes DPI chunks in IFF-ILBM files to dpi.
**
** This script requires ADPro 2.0.0 (or higher) or MorphPlus 1.0.0 (or
** higher) with ADPro's ZapDPI program to run.
**
** Copyright © 1992 ASDG Incorporated  All Rights Reserved
*/


ADDRESS "ADPro"
OPTIONS RESULTS


NEWLINE = '0A'X

GETFILES '"Select IFF files to Zap:"'
IF (RC ~= 0) THEN DO
	/*
	** No selection was made
	*/
	EXIT
END

FileList = ADPRO_RESULT
FileCount = WORDS( FileList )
Counter = 1

DO WHILE (Counter <= FileCount)
	ADDRESS COMMAND "ZapDPI -dpi" WORD( FileList, Counter )
	IF (RC = 20) THEN
		OKAY1 "Error while changing:" || NEWLINE || WORD( FileList, Counter )
	Counter = Counter + 1
END
