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

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5. Lines=9
  6. 01=Picture In Picture
  7. 02= 
  8. 03=This script loads each image of the File List Window
  9. 04=into ImageFX and allows the user to add another image
  10. 05=or clip any where and any size to the image. This can
  11. 06=be used for over the shoulder type shots as seen on the
  12. 07=news or use a background and have moving video in the
  13. 08=center. It also lets you add shadows (soft or hard) and
  14. 09=beveled edges to the PIP image.
  15.  
  16. */
  17.  
  18. options results
  19.  
  20. arg FrameNum TotalFiles
  21. address "IMAGEFX.1"
  22.  
  23. Start = 0
  24. if FrameNum = 0 then do
  25.     FrameNum = 1
  26.     Gadget.1 = 'Select Type For PIP!'
  27.     Gadget.2 = 'IMAGE'
  28.     Gadget.3 = 'SEQUENCE'
  29.     Gadget.4 = 'CLIP'
  30.     ListRequest 4 Gadget
  31.     if result = 2 then Type = "IMAGE"
  32.     if result = 3 then Type = "SEQUENCE"
  33.     if result = 4 then Type = "CLIP"
  34.  
  35.     if Type = "SEQUENCE" then do
  36.         RequestFile '"Select Path & BaseName For PIP!"'
  37.         PicName = result
  38.         RequestNumber '"Select Frame Number To Start With!"' 1
  39.         Start = result-1
  40.         end
  41.     else do
  42.         RequestFile '"Select File To Use For PIP!"'
  43.         PicName = result
  44.         end
  45.  
  46.     if Type = "CLIP" then do
  47.         Address CT_1 GetClipLength PicName
  48.         Start = result
  49.         RequestSlider '"Start With What Frame Of Clip!"' 1 Start 1
  50.         Start = result-1
  51.         end
  52.     KillBrush
  53.     call PickBox()
  54.  
  55.  
  56.  
  57.     RequestResponse "Do You Want To Add A Shadow?"
  58.     Answer2 = "YES"
  59.     if rc ~= 0 then Answer2 = "NO"
  60.     if Answer2 = "YES" then do
  61.         RequestSlider '"Enter Amount To Darken Shadow!"' 1 100 60
  62.         Answer3 = result
  63.         RequestSlider '"Enter Offset For Shadow!"' 1 20 6
  64.         Answer4 = result
  65.         RequestResponse "Do You Want Soft Edge Shadows?"
  66.         Answer6 = "YES"
  67.         if rc ~= 0 then Answer6 = "NO"
  68.         if Answer6 = "YES" then do
  69.             RequestSlider '"Enter Amount To Feather Shadow!"' 1 50 5
  70.             Answer7 = Result
  71.             end
  72.         end
  73.  
  74.  
  75.  
  76.     RequestResponse "Do You Want To Bevel Image?"
  77.     Answer5 = "NO"
  78.     if rc = 0 then Answer5 = "YES"
  79.     if Answer5 = "YES" then do
  80.         RequestSlider '"Enter Amount To Bevel!"' 1 30 7
  81.         Answer5 = result
  82.         end
  83.     if Answer5 = "NO" then do
  84.         RequestResponse "Do You Want Soft Edge On PIP?"
  85.         Answer8 = "YES"
  86.         if rc ~= 0 then Answer8 = "NO"
  87.         if Answer8 = "YES" then do
  88.             RequestSlider '"Enter Amount To Feather PIP!"' 1 50 5
  89.             Answer9 = result
  90.             end
  91.         end
  92.  
  93.     call open TempFile,"RAM:CT-IFABB",W
  94.     call writeln TempFile,Answer
  95.     call writeln TempFile,Answer2
  96.     call writeln TempFile,Answer3
  97.     call writeln TempFile,Answer4
  98.     call writeln TempFile,Answer5
  99.     call writeln TempFile,Answer6
  100.     call writeln TempFile,Answer7
  101.     call writeln TempFile,Answer8
  102.     call writeln TempFile,Answer9
  103.     call writeln TempFile,PicName
  104.     call writeln TempFile,Type
  105.     call writeln TempFile,Start
  106.     call close TempFile
  107.     end
  108. else do
  109.     call open TempFile,"RAM:CT-IFABB",R
  110.     line = readln(TempFile)
  111.     parse var line X1 Y1 X2 Y2
  112.     line = readln(TempFile)
  113.     parse var line Answer2
  114.     line = readln(TempFile)
  115.     parse var line Answer3
  116.     line = readln(TempFile)
  117.     parse var line Answer4
  118.     line = readln(TempFile)
  119.     parse var line Answer5
  120.     line = readln(TempFile)
  121.     parse var line Answer6
  122.     line = readln(TempFile)
  123.     parse var line Answer7
  124.     line = readln(TempFile)
  125.     parse var line Answer8
  126.     line = readln(TempFile)
  127.     parse var line Answer9
  128.     line = readln(TempFile)
  129.     parse var line PicName
  130.     line = readln(TempFile)
  131.     parse var line Type
  132.     line = readln(TempFile)
  133.     parse var line Start
  134.     call close TempFile
  135.     end
  136.  
  137. DrawMode Normal
  138. ActiveColor 1
  139. GetMain
  140. parse var result Name Width Height Blah
  141. AlphaChannel Off
  142. FrameNum = FrameNum + Start
  143. if Type = "CLIP" then
  144.     LoadBrush PicName FrameNum
  145. if Type = "IMAGE" then
  146.     LoadBrush PicName
  147. if Type = "SEQUENCE" then
  148.     LoadBrush PicName""right(FrameNum,3,'0')
  149.  
  150. Scale X2-X1 Y2-Y1
  151. BrushHandle 0 0
  152. Blend 100
  153. if Answer2 = "YES" then do
  154.     if Answer6 = "YES" then EdgeMode FeatherOut Answer7
  155.     ActiveColor 1
  156.     Blend Answer3
  157.     DrawMode Darken
  158.     FilledBox X1+Answer4 Y1+Answer4 (X2-(X1+Answer4))+Answer4 (Y2-(Y1+Answer4))+Answer4 
  159.     FilledBox X1+Answer4 Y1+Answer4 (X2-(X1+Answer4))+Answer4 (Y2-(Y1+Answer4))+Answer4 
  160.     EdgeMode Normal
  161.     end
  162.  
  163. Blend 100
  164. DrawMode Normal
  165. if Answer8 = "YES" then do
  166.     EdgeMode FeatherOut Answer9
  167.     FillMode Warp 0 0 0 SMOOTH
  168.     AirbrushSettings 5 50 0 Spray
  169.     FilledBox X1 Y1 X2-X1 Y2-Y1
  170.     EdgeMode Normal
  171.     end
  172. else do
  173.     Point X1 Y1
  174.     end
  175.  
  176. if Answer5 ~= "NO" then do
  177.     Depth = Answer5
  178.     Blend 90
  179.     NewArea
  180.     DrawMode Lighten
  181.     AddArea X1+1 Y1
  182.     AddArea X2 Y1
  183.     AddArea X2-Depth+1 Y1+Depth-1
  184.     AddArea X1+Depth Y1+Depth-1
  185.     AddArea X1+1 Y1
  186.     FilledPoly
  187.  
  188.     NewArea
  189.     DrawMode Lighten
  190.     AddArea X1 Y1
  191.     AddArea X1+Depth-1 Y1+Depth-1
  192.     AddArea X1+Depth-1 Y2-Depth+1
  193.     AddArea X1 Y2
  194.     AddArea X1 Y1
  195.     FilledPoly
  196.     FilledPoly
  197.  
  198.     Blend 70
  199.  
  200.     NewArea
  201.     DrawMode Darken
  202.     AddArea X2-Depth+1 Y1+Depth 
  203.     AddArea X2 Y1+1
  204.     AddArea X2 Y2 
  205.     AddArea X2-Depth+1 Y2-Depth+1
  206.     AddArea X2-Depth+1 Y1+Depth
  207.     FilledPoly
  208.  
  209.     NewArea
  210.     DrawMode Darken
  211.     AddArea X2-1 Y2
  212.     AddArea X1+1 Y2
  213.     AddArea X1+Depth Y2-Depth+1  
  214.     AddArea X2-Depth Y2-Depth+1 
  215.     AddArea X2-1 Y2
  216.     FilledPoly
  217.     FilledPoly
  218.     end
  219. KillBrush
  220.  
  221.  
  222. exit
  223.  
  224.  
  225.  
  226. PickBox:
  227.     Menu ToolBox
  228.     RequestNotify "Draw Rectangle Where You Want New Image Placed!"
  229.     DrawTool Box
  230.     HidePanel
  231.     Undo On
  232.     WaitFor SELECTDOWN
  233.     parse var result X1 Y1
  234.     WaitFor SELECTUP
  235.     parse var result X2 Y2
  236.     Undo
  237.     ShowPanel
  238.     Undo Off
  239.     X1 = strip(X1)
  240.     Y1 = strip(Y1)
  241.     X2 = strip(X2)
  242.     Y2 = strip(Y2)
  243.     Answer = X1" "Y1" "X2" "Y2
  244.     RequestResponse "Is The Box You Selected Correct?"
  245.     if rc ~= 0 then call PickBox()
  246.  
  247. return
  248.