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

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5. Lines=6
  6. 01=Growing Peep Hole
  7. 02= 
  8. 03=This script loads each image of the File List Window
  9. 04=into ImageFX. It then asks for a background image or
  10. 05=clip and gradually a hole in the center grows allowing
  11. 06=the second image to show through.
  12. */
  13.  
  14. options results
  15.  
  16. arg FrameNum TotalFiles
  17. address "IMAGEFX.1"
  18.  
  19. Start = 0
  20. if FrameNum = 0 then do
  21.     FrameNum = 1
  22.     Gadget.1 = 'Select Type For BackGround!'
  23.     Gadget.2 = 'IMAGE'
  24.     Gadget.3 = 'SEQUENCE'
  25.     Gadget.4 = 'CLIP'
  26.     ListRequest 4 Gadget
  27.     if result = 2 then Type = "IMAGE"
  28.     if result = 3 then Type = "SEQUENCE"
  29.     if result = 4 then Type = "CLIP"
  30.  
  31.     if Type = "SEQUENCE" then do
  32.         RequestFile '"Select Path & BaseName For BackGround!"'
  33.         PicName = result
  34.         RequestNumber '"Select Frame Number To Start With!"' 1
  35.         Start = result-1
  36.         end
  37.     else do
  38.         RequestFile '"Select File To Use For BackGround!"'
  39.         PicName = result
  40.         end
  41.  
  42.     if Type = "CLIP" then do
  43.         Address CT_1 GetClipLength PicName
  44.         Start = result
  45.         RequestSlider '"Start With What Frame Of Clip!"' 1 Start 1
  46.         Start = result-1
  47.         end
  48.  
  49.     RequestSlider '"Enter Amount To Feather Peep Hole!"' 1 50 5
  50.     Answer = Result
  51.  
  52.     call open TempFile,"RAM:CT-IFGPH",W
  53.     call writeln TempFile,PicName
  54.     call writeln TempFile,Type
  55.     call writeln TempFile,Answer
  56.     call writeln TempFile,Start
  57.     call close TempFile
  58.     end
  59. else do
  60.     call open TempFile,"RAM:CT-IFGPH",R
  61.     line = readln(TempFile)
  62.     parse var line PicName
  63.     line = readln(TempFile)
  64.     parse var line Type
  65.     line = readln(TempFile)
  66.     parse var line Answer
  67.     line = readln(TempFile)
  68.     parse var line Start
  69.     call close TempFile
  70.     end
  71.  
  72.  
  73. GetMain
  74. parse var result Name Width Height Blah
  75.  
  76. Swap
  77. if FrameNum = 0 then CreateBuffer 752 480 Force
  78. ClearBuffer Force 0 0 0
  79. AlphaChannel Off
  80. EdgeMode FeatherOut Answer
  81. if Width > Height then
  82.     Num = ((FrameNum * Height)/TotalFiles)%1
  83. else
  84.     Num = ((FrameNum * Width)/TotalFiles)%1
  85. FilledOval Width/2 Height/2 Num Num
  86. EdgeMode Normal
  87. Buffer2Alpha
  88.  
  89. FrameNum = FrameNum + Start
  90. if Type = "CLIP" then
  91.     LoadBuffer PicName Force FrameNum
  92. if Type = "IMAGE" then
  93.     LoadBuffer PicName Force
  94. if Type = "SEQUENCE" then do
  95.     if FrameNum < 1000 then
  96.         LoadBuffer PicName""right(FrameNum,3,'0') Force
  97.     if FrameNum < 10000 then
  98.         LoadBuffer PicName""right(FrameNum,4,'0') Force
  99.     end
  100.  
  101.  
  102. Swap
  103. AlphaChannel FRISKET
  104. Merge 100 Alpha
  105.  
  106.  
  107. exit
  108.  
  109.  
  110.  
  111.