home *** CD-ROM | disk | FTP | other *** search
- /*
- Visual FX
- For
- Image FX
- SetUp Script
- Written By J.L. White
-
- (C)1997 Merlin's Software
-
- */
-
- parse arg Num Frames
- options results
- address "IMAGEFX.1"
- ReDraw On
-
- RequestResponse "Do You Need Instructions?"
- if rc = 0 then do
- call Docs()
- end
-
- if exists("libs:flyer.library") then do
- if (POS('PROJECT_REXX_PORT',SHOW('Ports')) =0) then do
- RequestNotify 'Flyer Must Be Running First!'
- exit
- end
- call OpenFlyStuff()
-
-
- Gadget.1 = 'D/110/22/120/ImageA Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 250 60
- if rc ~= 0 then do
- call CloseStuff()
- exit 0
- end
- else do
- IAType = RESULT.1
- end
-
- call GetA()
- end
- else do
- Gadget.1 = 'D/110/22/120/ImageA Type/2/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 250 60
- if rc ~= 0 then do
- call CloseStuff()
- exit 0
- end
- else do
- IAType = RESULT.1+2
- end
-
- call GetA()
- end
-
- if FlyOn = 1 then
- call CloseStuff()
-
- Gadget.1 = 'Select Operator For Vignette!'
- Gadget.2 = 'Lighten'
- Gadget.3 = 'Emboss'
- Gadget.4 = 'Solarize'
- Gadget.5 = 'Negative'
- Gadget.6 = 'Posterize'
- Gadget.7 = 'Antique'
- Gadget.8 = 'Blur'
- Gadget.9 = 'Darken'
- ListRequest 9 Gadget
- Type2 = 0
- if result = 2 then Type2 = 0
- if result = 3 then Type2 = 1
- if result = 4 then Type2 = 2
- if result = 5 then Type2 = 3
- if result = 6 then Type2 = 4
- if result = 7 then Type2 = 5
- if result = 8 then Type2 = 6
- if result = 9 then Type2 = 7
-
- ArgType2 = 0
- if Type2 = 0 then do
- RequestSlider '"Enter Brightness Of Image!"' 1 255 120
- ArgType2 = Result
- end
- if Type2 = 7 then do
- RequestSlider '"Enter Darkness Of Image!"' 1 255 120
- ArgType2 = Result
- end
-
- AlphaName = "VFXIFX:Images/Brushes/Vignette"
-
- Gadget.1 = ' Select Alpha Type! '
- Gadget.2 = ' Use Default Image '
- Gadget.3 = ' User Selected Image '
- Gadget.4 = ' User Selected Sequence '
- ListRequest 4 Gadget
- AType = 0
- if result = 2 then AType = 0
- if result = 3 then AType = 1
- if result = 4 then AType = 2
-
- if AType = 1 then do
- RequestFile '"Select File For Alpha Channel!" "RAM:" ""'
- AlphaName = result
- end
-
- if AType = 2 then do
- RequestFile '"Select Path & BaseName For Alpha Channel!" "RAM:" ""'
- AlphaName = result
- end
-
- call open TempFile,"VFXIFX:TempDrawer/"strip(Num),W
- call writeln TempFile,PicAName
- call writeln TempFile,Start
- call writeln TempFile,End
- call writeln TempFile,IAType
- call writeln TempFile,Type2
- call writeln TempFile,ArgType2
- call writeln TempFile,AlphaName
- call close TempFile
- exit
-
-
-
- GetFile:
- parse Arg Title, Path
- Address FLY_1 SetString Path
- Address FLY_1 GetFileNameNT Title
- return result
-
- GetFileName: procedure
- parse ARG CompleteName
- c = lastpos("/",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return substr(CompleteName, c + 1)
-
-
- GetA:
- if IAType = 0 then do
- call Switcher(TOSW)
- PicAName = GetFile("Select Flyer Clip For ImageA! ",DriveName)
- Name = GetFileName(PicAName)
- if Name = "" then do
- Address FLY_1 OK_TEXT " OK "
- Title = "You Must Enter A Valid Clip Name To Use!"
- Address FLY_1 FYINT Title
- Address FLY_1 Quit
- call Switcher(TOWB)
- exit
- end
- Address FLY_1 SetFileName PicAName
- Address FLY_1 GetClipLength PicAName
- End = result
- Start = 0
- Address FLY_1 Program "5"
- Address FLY_1 StartNum Start
- Address FLY_1 EndNum End
- Address FLY_1 CurrentNum "0"
- Address FLY_1 GetTimeNT "Select A Range Of Frames To Process!"
- Start = word(result,1)*2
- End = word(result,2)*2
- Start = Start + 1
- End = End +2
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- call Switcher(TOWB)
- address command "C:Wait 1"
- ScreenToFront
- end
- if IAType = 1 then do
- RequestFile '"Select Flyer Still For ImageA!"' DriveName ' '
- PicAName = result
- Name = GetFileName(PicAName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- RequestNumber '"Enter Number Of Frames To Process!"' Frames
- End = result
- Start = 1
- end
- if IAType = 2 then do
- RequestFile '"Select FileName For ImageA!"' 'SYS:' ' '
- PicAName = result
- Name = GetFileName(PicAName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- RequestNumber '"Enter Number Of Frames To Process!"' Frames
- End = result
- Start = 1
- end
- if IAType = 3 then do
- RequestFile '"Select BaseName For ImageA! "' 'SYS:' ' '
- PicAName = result
- Name = GetFileName(PicAName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- RequestNumber '"Enter Number Of Frames To Process!"' Frames
- End = result
- Start = 1
- end
- return
-
- CloseStuff:
- Address FLY_1 Quit
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- return
-
-
-
- OpenFlyStuff:
- FlyOn = 1
- address command "run VFXIFX:FLY"
- do while (POS('FLY_1',SHOW('Ports')) = 0)
- address command "wait 1"
- end
- TOASTERLIB="ToasterARexx.port"
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- DriveName = FindDrive()
- return
-
-
- FindDrive:
- address command "C:Info >RAM:DriveList"
- call open TempFile,"RAM:DriveList",R
- do until eof(TempFile)
- line = readln(TempFile)
- parse var line Drive" "Rest
- if Drive = "FA0:" then
- FlyVolume = word(Rest,7)":"
- end
- call close TempFile
- address command "Delete >NIL: RAM:DriveList"
- return FlyVolume
-
-
-
- LoadA:
- if IAType = 0 then do
- LoadBuffer PicAName Force i
- end
- if IAType = 1 then do
- LoadBuffer PicAName Force 1
- end
- if IAType = 2 then do
- LoadBuffer PicAName Force
- end
- if IAType = 3 then do
- LoadBuffer PicAName""right(i,3,'0') Force
- end
- return
-
-
-
- Docs:
-
- text1 = '"This effect takes an image and creates a vignette"'
- text2 = '"type of an effect. The center of the image is left"'
- text3 = '"alone, but the edges are blurred, solarized, darkened,"'
- text4 = '"etc. which will give it a hazy dream kind of look."'
- text5 = '"The vignette is based on a B&W alpha image which you"'
- text6 = '"can use the default image, another image or sequence."'
-
- Gadget.1 = 'TEXT LE=10 TE=4 LB='text1' '
- Gadget.2 = 'TEXT LE=10 TE=14 LB='text2' '
- Gadget.3 = 'TEXT LE=10 TE=24 LB='text3' '
- Gadget.4 = 'TEXT LE=10 TE=34 LB='text4' '
- Gadget.5 = 'TEXT LE=10 TE=44 LB='text5' '
- Gadget.6 = 'TEXT LE=10 TE=54 LB='text6' '
- Gadget.7 = 'END'
- NewComplexRequest '"Instructions For Effect #05"' Gadget 400 66
-
- return
-
-