home *** CD-ROM | disk | FTP | other *** search
- /*
- Control Tower Arexx Script
- Written By J.L. White
- (C)1995 Merlin's Software
- Lines=9
- 01=Picture In Picture
- 02=
- 03=This script loads each image of the File List Window
- 04=into ImageFX and allows the user to add another image
- 05=or clip any where and any size to the image. This can
- 06=be used for over the shoulder type shots as seen on the
- 07=news or use a background and have moving video in the
- 08=center. It also lets you add shadows (soft or hard) and
- 09=beveled edges to the PIP image.
-
- */
-
- options results
-
- arg FrameNum TotalFiles
- address "IMAGEFX.1"
-
- Start = 0
- if FrameNum = 0 then do
- FrameNum = 1
- Gadget.1 = 'Select Type For PIP!'
- Gadget.2 = 'IMAGE'
- Gadget.3 = 'SEQUENCE'
- Gadget.4 = 'CLIP'
- ListRequest 4 Gadget
- if result = 2 then Type = "IMAGE"
- if result = 3 then Type = "SEQUENCE"
- if result = 4 then Type = "CLIP"
-
- if Type = "SEQUENCE" then do
- RequestFile '"Select Path & BaseName For PIP!"'
- PicName = result
- RequestNumber '"Select Frame Number To Start With!"' 1
- Start = result-1
- end
- else do
- RequestFile '"Select File To Use For PIP!"'
- PicName = result
- end
-
- if Type = "CLIP" then do
- Address CT_1 GetClipLength PicName
- Start = result
- RequestSlider '"Start With What Frame Of Clip!"' 1 Start 1
- Start = result-1
- end
- KillBrush
- call PickBox()
-
-
-
- RequestResponse "Do You Want To Add A Shadow?"
- Answer2 = "YES"
- if rc ~= 0 then Answer2 = "NO"
- if Answer2 = "YES" then do
- RequestSlider '"Enter Amount To Darken Shadow!"' 1 100 60
- Answer3 = result
- RequestSlider '"Enter Offset For Shadow!"' 1 20 6
- Answer4 = result
- RequestResponse "Do You Want Soft Edge Shadows?"
- Answer6 = "YES"
- if rc ~= 0 then Answer6 = "NO"
- if Answer6 = "YES" then do
- RequestSlider '"Enter Amount To Feather Shadow!"' 1 50 5
- Answer7 = Result
- end
- end
-
-
-
- RequestResponse "Do You Want To Bevel Image?"
- Answer5 = "NO"
- if rc = 0 then Answer5 = "YES"
- if Answer5 = "YES" then do
- RequestSlider '"Enter Amount To Bevel!"' 1 30 7
- Answer5 = result
- end
- if Answer5 = "NO" then do
- RequestResponse "Do You Want Soft Edge On PIP?"
- Answer8 = "YES"
- if rc ~= 0 then Answer8 = "NO"
- if Answer8 = "YES" then do
- RequestSlider '"Enter Amount To Feather PIP!"' 1 50 5
- Answer9 = result
- end
- end
-
- call open TempFile,"RAM:CT-IFABB",W
- call writeln TempFile,Answer
- call writeln TempFile,Answer2
- call writeln TempFile,Answer3
- call writeln TempFile,Answer4
- call writeln TempFile,Answer5
- call writeln TempFile,Answer6
- call writeln TempFile,Answer7
- call writeln TempFile,Answer8
- call writeln TempFile,Answer9
- call writeln TempFile,PicName
- call writeln TempFile,Type
- call writeln TempFile,Start
- call close TempFile
- end
- else do
- call open TempFile,"RAM:CT-IFABB",R
- line = readln(TempFile)
- parse var line X1 Y1 X2 Y2
- line = readln(TempFile)
- parse var line Answer2
- line = readln(TempFile)
- parse var line Answer3
- line = readln(TempFile)
- parse var line Answer4
- line = readln(TempFile)
- parse var line Answer5
- line = readln(TempFile)
- parse var line Answer6
- line = readln(TempFile)
- parse var line Answer7
- line = readln(TempFile)
- parse var line Answer8
- line = readln(TempFile)
- parse var line Answer9
- line = readln(TempFile)
- parse var line PicName
- line = readln(TempFile)
- parse var line Type
- line = readln(TempFile)
- parse var line Start
- call close TempFile
- end
-
- DrawMode Normal
- ActiveColor 1
- GetMain
- parse var result Name Width Height Blah
- AlphaChannel Off
- FrameNum = FrameNum + Start
- if Type = "CLIP" then
- LoadBrush PicName FrameNum
- if Type = "IMAGE" then
- LoadBrush PicName
- if Type = "SEQUENCE" then
- LoadBrush PicName""right(FrameNum,3,'0')
-
- Scale X2-X1 Y2-Y1
- BrushHandle 0 0
- Blend 100
- if Answer2 = "YES" then do
- if Answer6 = "YES" then EdgeMode FeatherOut Answer7
- ActiveColor 1
- Blend Answer3
- DrawMode Darken
- FilledBox X1+Answer4 Y1+Answer4 (X2-(X1+Answer4))+Answer4 (Y2-(Y1+Answer4))+Answer4
- FilledBox X1+Answer4 Y1+Answer4 (X2-(X1+Answer4))+Answer4 (Y2-(Y1+Answer4))+Answer4
- EdgeMode Normal
- end
-
- Blend 100
- DrawMode Normal
- if Answer8 = "YES" then do
- EdgeMode FeatherOut Answer9
- FillMode Warp 0 0 0 SMOOTH
- AirbrushSettings 5 50 0 Spray
- FilledBox X1 Y1 X2-X1 Y2-Y1
- EdgeMode Normal
- end
- else do
- Point X1 Y1
- end
-
- if Answer5 ~= "NO" then do
- Depth = Answer5
- Blend 90
- NewArea
- DrawMode Lighten
- AddArea X1+1 Y1
- AddArea X2 Y1
- AddArea X2-Depth+1 Y1+Depth-1
- AddArea X1+Depth Y1+Depth-1
- AddArea X1+1 Y1
- FilledPoly
-
- NewArea
- DrawMode Lighten
- AddArea X1 Y1
- AddArea X1+Depth-1 Y1+Depth-1
- AddArea X1+Depth-1 Y2-Depth+1
- AddArea X1 Y2
- AddArea X1 Y1
- FilledPoly
- FilledPoly
-
- Blend 70
-
- NewArea
- DrawMode Darken
- AddArea X2-Depth+1 Y1+Depth
- AddArea X2 Y1+1
- AddArea X2 Y2
- AddArea X2-Depth+1 Y2-Depth+1
- AddArea X2-Depth+1 Y1+Depth
- FilledPoly
-
- NewArea
- DrawMode Darken
- AddArea X2-1 Y2
- AddArea X1+1 Y2
- AddArea X1+Depth Y2-Depth+1
- AddArea X2-Depth Y2-Depth+1
- AddArea X2-1 Y2
- FilledPoly
- FilledPoly
- end
- KillBrush
-
-
- exit
-
-
-
- PickBox:
- Menu ToolBox
- RequestNotify "Draw Rectangle Where You Want New Image Placed!"
- DrawTool Box
- HidePanel
- Undo On
- WaitFor SELECTDOWN
- parse var result X1 Y1
- WaitFor SELECTUP
- parse var result X2 Y2
- Undo
- ShowPanel
- Undo Off
- X1 = strip(X1)
- Y1 = strip(Y1)
- X2 = strip(X2)
- Y2 = strip(Y2)
- Answer = X1" "Y1" "X2" "Y2
- RequestResponse "Is The Box You Selected Correct?"
- if rc ~= 0 then call PickBox()
-
- return
-