home *** CD-ROM | disk | FTP | other *** search
- /*
- ** CheckForImageData
- **
- ** $VER: CheckForImageData 1.0.0 (23.10.93)
- **
- ** This ARexx script contains a function which checks for the existence
- ** of any type of image data within ADPro's or MorphPlus' primary image buffer.
- **
- ** INPUTS
- ** None
- **
- ** RETURNS
- ** returnCode -- 0 if 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
-
- RETURN returnCode
-