/* ** WriteAbekas.fred ** ** $VER: WriteAbekas.fred 1.3.0 (25.2.94) ** ** This FRED ARexx script will write the currently selected frames from ** a sequence file to the Abekas/Exabyte tape. ** ** Insert the script into the FRED Invoke ADPro control panel. You must ** be using FRED 1.1.5 (or higher). ** ** This script requires ADPro 2.3.0/Morph 1.2.0 or higher to operate. ** ** Copyright © 1992-1994 ASDG, Incorporated ** All Rights Reserved */ ADDRESS "ADPro" OPTIONS RESULTS PARSE ARG frameNum frameFName length loadFlag firstCallSeq firstCallCell NL = '0A'X SQ = '27'X DQ = '22'X TRUE = 1 FALSE = 0 /* ** Check for raw, color image data. If not, make it so. */ IMAGE_TYPE ImageType = ADPRO_RESULT IF (WORD( ImageType, 1 ) = "NONE") 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." ADPRO_TO_BACK EXIT 10 END ELSE IF (WORD( ImageType, 1 ) = "BITPLANE") THEN DO /* ** There's no raw data, but there is rendered data. ** The user must want us to modify the rendered data. */ OPERATOR "RENDERED_TO_RAW" IF (RC ~= 0) THEN DO ADPRO_TO_FRONT OKAY1 "Converting rendered to raw failed." ADPRO_TO_BACK EXIT 10 END END IF (WORD( ImageType, 1 ) = "GRAY") THEN DO OPERATOR "GRAY_TO_COLOR" IF (RC ~= 0) THEN DO ADPRO_TO_FRONT OKAY1 "Could not force into color." ADPRO_TO_BACK EXIT 10 END END /* ** Do we start a new tape or do we append to an existing tape? */ counter = 0 IF (firstCallSeq = 1) THEN DO ADPRO_TO_FRONT OKAY2 "Select OK to Start New Tape, or" || NL ||, "Cancel to Append." Start = RC IF (Start ~= 0) THEN DO ADPRO_TO_FRONT OKAY1 "The next panel you see will be the " || NL ||, "Abekas saver control panel. To start " || NL ||, "a new tape, make sure the SAVE MODE " || NL ||, "button is set to START NEW TAPE. " SFORMAT "ABEKAS" IF (RC ~= 0) THEN DO ADPRO_TO_FRONT OKAY1 "Cannot find ABEKAS saver." EXIT 10 END SAVE_GUI counter = 1 /* first frame was already saved */ END END /* ** Start loading in and saving out the frames we specified */ DO WHILE (counter < length) SAVE "XXX" "RAW" "APPEND" IF (RC ~= 0) THEN DO ADPRO_TO_FRONT OKAY1 "Error appending frame#" || frameNum+counter || NL ||, frameFName || NL || NL ||, "Skipping." ADPRO_TO_BACK EXIT 10 END counter = counter + 1 END EXIT 0