home *** CD-ROM | disk | FTP | other *** search
- /*
- ** AdjustBalancing.fred.pre
- **
- ** $VER: AdjustBalancing.pre 1.2.0 (23.10.93)
- **
- ** If the AdjustBalancing.fred script appears in the InvokeADPro list,
- ** this program will ask the user to enter the new Balancing settings
- ** for all frames. Alternatively, the user can specify that the program
- ** query for frame-specific settings.
- **
- ** Clips Exported:
- ** FREDGlobalModify - ~0 if operation is global
- ** 0 if it should be frame-specific
- ** FREDRedLevel - Red component value
- ** FREDGreenLevel - Green component value
- ** FREDBlueLevel - Blue component value
- ** FREDBrightnessLevel - Brightness component value
- ** FREDContrastLevel - Contrast component value
- ** FREDGammaLevel - Gamma component value
- **
- ** NOTE: Clip names are case sensitive.
- **
- ** This script requires FRED v1.4.0 (or higher) to run. Also required is
- ** ADPro v2.5.0 (or higher).
- **
- ** Copyright © 1993 ASDG, Incorporated
- ** All Rights Reserved
- **
- ** GAMMA ARexx command changed in ADPRO 2.0.4
- ** The new range is -50 to 50, not 0 to 100
- ** updated this script Monday 26-Jul-93, joe porkka (After ADPRO 2.3)
- */
-
-
- ADDRESS "ADPro"
- OPTIONS RESULTS
-
- PARSE ARG NumberOfCells NumberOfFrames
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
-
- /*
- ** Ask if the operation should be done globally or on
- ** a frame-by-frame basis.
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"AdjustBalancing.fred"' '"Do global modification?"' '"Global|Frame-Specific|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- GlobalModify = 2 - RC
-
- SCREEN_TO_FRONT "FRED"
-
-
- /*
- ** Ask the user for the new Balancing values.
- */
-
- IF (GlobalModify ~= 0) THEN DO
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Red level"' 0 (-50) 50 TRUE
- IF (RESULT = ((-50)-1)) THEN
- EXIT 10
- RedLevel = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Green level"' 0 (-50) 50 TRUE
- IF (RESULT = ((-50)-1)) THEN
- EXIT 10
- GreenLevel = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Blue level"' 0 (-50) 50 TRUE
- IF (RESULT = ((-50)-1)) THEN
- EXIT 10
- BlueLevel = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Brightness level"' 0 (-50) 50 TRUE
- IF (RESULT = ((-50)-1)) THEN
- EXIT 10
- BrightnessLevel = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Contrast level"' 0 (-50) 50 TRUE
- IF (RESULT = ((-50)-1)) THEN
- EXIT 10
- ContrastLevel = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Gamma level"' 0 (-50) 50 TRUE /* 50 0 100 -- Pre ADPro 2.0.4 */
- IF (RESULT = ((-50)-1)) THEN
- EXIT 10
- GammaLevel = RESULT
-
- SETCLIP( "FREDRedLevel", RedLevel )
- SETCLIP( "FREDGreenLevel", GreenLevel )
- SETCLIP( "FREDBlueLevel", BlueLevel )
- SETCLIP( "FREDBrightnessLevel", BrightnessLevel )
- SETCLIP( "FREDContrastLevel", ContrastLevel )
- SETCLIP( "FREDGammaLevel", GammaLevel )
- END
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDGlobalModify", GlobalModify )
-
- EXIT 0
-