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

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