/* ** CheckForRenderedImageData ** ** $VER: CheckForRenderedImageData 1.0.0 (24.10.93) ** ** This ARexx script contains a function which checks for the existence ** of raw image data within ADPro's or MorphPlus' primary image buffer. ** If rendered image data exists, an attempt will be made to create raw ** data from it. ** ** INPUTS ** None ** ** RETURNS ** returnCode -- 0 if raw image data exists, 10 otherwise. ** ** This script requires at least ADPro v2.5.0. ** ** Copyright © 1993 ASDG, Incorporated ** All Rights Reserved */ ADDRESS "ADPro" OPTIONS RESULTS PARSE ARG Complain NL = '0A'X SQ = '27'X DQ = '22'X TRUE = 1 FALSE = 0 /* ** Check for the existence of image data. */ returnCode = 0 IMAGE_TYPE ImageType = ADPRO_RESULT IF (WORD( ImageType, 1 ) = "NONE") THEN DO IF (Complain = TRUE) THEN DO ADPRO_TO_FRONT OKAY1 "There is currently no image" || NL ||, "in ADPro's image buffer. An image" || NL ||, "is required for this operation." SCREEN_TO_FRONT "FRED" END returnCode = 10 END ELSE IF (WORD( ImageType, 1 ) ~= "BITPLANE") & (WORD( ImageType, 2 ) ~= "BITPLANE") THEN DO IF (Complain = TRUE) THEN DO ADPRO_TO_FRONT OKAY1 "There is currently no rendered" || NL ||, "data in ADPro's buffer. Rendered" || NL ||, "data is required for this operation." SCREEN_TO_FRONT "FRED" END returnCode = 10 END RETURN returnCode