home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDG-CT1.DMS / in.adf / CT.run / Scripts2 / 5 / Gradually_Adjust_Contrast < prev    next >
Encoding:
Text File  |  1995-10-16  |  1.1 KB  |  51 lines

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5.  
  6. Lines=7
  7. 01=Gradually Adjust Contrast
  8. 02= 
  9. 03=This script loads each image of the File List Window
  10. 04=into ImageFX and Gradually adjust the Contrast over
  11. 05=the length of frames. It divides the total number of
  12. 06=frames by the current frame number * the highest value
  13. 07=of this function to gradually adjust the list.
  14.  
  15. */
  16.  
  17. options results
  18.  
  19. arg Num TotalNum
  20. address "IMAGEFX.1"
  21.  
  22.  
  23. if Num = 0 then do
  24.     Num = 1
  25.     Gadget.1 = 'Select Direction To Use!'
  26.     Gadget.2 = 'UP'
  27.     Gadget.3 = 'DOWN'
  28.     ListRequest 3 Gadget
  29.     if result = 2 then Answer = "UP"
  30.     if result = 3 then Answer = "DOWN"
  31.     call open TempFile,"Ram:CT-IFGC",W
  32.     call writeln TempFile,Answer
  33.     call close TempFile
  34.     end
  35. else do
  36.     call open TempFile,"Ram:CT-IFGC",R
  37.     line = readln(TempFile)
  38.     parse var line Answer
  39.     call close TempFile
  40.     end
  41.  
  42. NewNum = ((Num * 127)/(TotalNum))
  43. NewNum = trunc(NewNum)
  44. if Num > 1 then do
  45.     if Answer = "UP" then
  46.         Contrast NewNum
  47.     else
  48.         Contrast 0-NewNum
  49.     end
  50. exit
  51.