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"
- Quotes = '22'X
-
- 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/130/22/120/Main Image Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 270 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/130/22/120/Main Image Type/2/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 270 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 = ' Do You Want Beveled Borders? '
- Gadget.2 = ' Beveled Borders '
- Gadget.3 = ' No Beveled Borders '
- ListRequest 3 Gadget
- Borders= 0
- if result = 2 then Borders = 1
- if result = 3 then Borders = 0
-
- Gadget.1 = ' Do You Want Drop Shadows? '
- Gadget.2 = ' Use Drop Shadows '
- Gadget.3 = ' No Drop Shadows '
- ListRequest 3 Gadget
- Shadows= 0
- if result = 2 then Shadows = 1
- if result = 3 then Shadows = 0
-
-
- Gadget.1 = ' Select Option For Top Border? '
- Gadget.2 = ' Use Scrolling Image '
- Gadget.3 = ' Use Color Shading '
- ListRequest 3 Gadget
- TopType= 0
- if result = 2 then TopType = 0
- if result = 3 then TopType = 1
-
- ReDraw On
- if TopType = 0 then do
- LoadBuffer "VFXIFX:Images/Pics/Seamless.Pic" Force
- RequestNotify "Look At Examples For FileName Then Click "Quotes"Okay"Quotes""
-
- RequestFile '"Select File To Scroll At Top!" "VFXIFX:Images/Seamless" ""'
- PicAName = result
- text1 = '"Move X"'
- text2 = '"Move Y"'
- Gadget.1 = 'SLIDER LE=60 TE=4 WD=150 HT=14 LB='text1' IN=1 LO=-10 HI=10 LV=%-3ld'
- Gadget.2 = 'SLIDER LE=60 TE=22 WD=150 HT=14 LB='text2' IN=1 LO=-10 HI=10 LV=%-3ld'
- Gadget.3 = 'END'
- NewComplexRequest '"Select X & Y Movements!"' Gadget 250 42
- if rc ~= 0 then do
- XOffA = 0
- YOffA = 0
- end
- else do
- XOffA = RESULT.1
- YOffA = RESULT.2
- end
- end
- if TopType = 1 then do
- RequestNotify "Click On Color To Use For Top Then Click "Quotes"Okay"Quotes""
- ActiveColor
- TopColor = result
- end
-
- if Borders = 1 then do
- RequestNotify "Click On Color To Use For Top Border Then Click "Quotes"Okay"Quotes""
- ActiveColor
- ColorA = result
- end
-
- Gadget.1 = ' Select Option For Bottom Border? '
- Gadget.2 = ' Use Scrolling Image '
- Gadget.3 = ' Use Color Shading '
- ListRequest 3 Gadget
- BottomType= 0
- if result = 2 then BottomType = 0
- if result = 3 then BottomType = 1
-
- if BottomType = 0 then do
-
- if TopType = 1 then do
- LoadBuffer "VFXIFX:Images/Pics/Seamless.Pic" Force
- RequestNotify "Look At Examples For FileName Then Click "Quotes"Okay"Quotes""
- end
- RequestFile '"Select File To Scroll At Bottom!" "VFXIFX:Images/Seamless" ""'
- PicBName = result
- text1 = '"Move X"'
- text2 = '"Move Y"'
- Gadget.1 = 'SLIDER LE=60 TE=4 WD=150 HT=14 LB='text1' IN=-1 LO=-10 HI=10 LV=%-3ld'
- Gadget.2 = 'SLIDER LE=60 TE=22 WD=150 HT=14 LB='text2' IN=1 LO=-10 HI=10 LV=%-3ld'
- Gadget.3 = 'END'
- NewComplexRequest '"Select X & Y Movements!"' Gadget 250 42
- if rc ~= 0 then do
- XOffB = 0
- YOffB = 0
- end
- else do
- XOffB = RESULT.1
- YOffB = RESULT.2
- end
- end
- if BottomType = 1 then do
- RequestNotify "Click On Color To Use For Bottom Then Click "Quotes"Okay"Quotes""
- ActiveColor
- BottomColor = result
- end
-
- if Borders = 1 then do
- RequestNotify "Click On Color To Use For Bottom Border Then Click "Quotes"Okay"Quotes""
- ActiveColor
- ColorB = result
- end
- ActiveColor 1
-
-
- call open TempFile,"VFXIFX:TempDrawer/"strip(Num),W
- call writeln TempFile,PicName
- call writeln TempFile,Start
- call writeln TempFile,End
- call writeln TempFile,IAType
- call writeln TempFile,PicAName
- call writeln TempFile,XOffA
- call writeln TempFile,YOffA
- call writeln TempFile,ColorA
- call writeln TempFile,PicBName
- call writeln TempFile,XOffB
- call writeln TempFile,YOffB
- call writeln TempFile,ColorB
- call writeln TempFile,Borders
- call writeln TempFile,Shadows
- call writeln TempFile,TopType
- call writeln TempFile,BottomType
- call writeln TempFile,TopColor
- call writeln TempFile,BottomColor
-
- call close TempFile
- exit
-
-
-
- GetFile:
- parse Arg Title, Path
- Address FLY_1 SetString Path
- Address FLY_1 GetFileNameNT Title
- return result
-
- GetFileName: procedure
- 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)
- PicName = GetFile("Select Flyer Clip For Main Image! ",DriveName)
- Name = GetFileName(PicName)
- 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 PicName
- Address FLY_1 GetClipLength PicName
- 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 Main Image!"' DriveName ' '
- PicName = result
- Name = GetFileName(PicName)
- 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 Main Image!"' 'SYS:' ' '
- PicName = result
- Name = GetFileName(PicName)
- 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 Main Image! "' 'SYS:' ' '
- PicName = result
- Name = GetFileName(PicName)
- 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 PicName Force Start
- end
- if IAType = 1 then do
- LoadBuffer PicName Force 1
- end
- if IAType = 2 then do
- LoadBuffer PicName Force
- end
- if IAType = 3 then do
- LoadBuffer PicName""right(Start,3,'0') Force
- end
- return
-
-
-
- Docs:
-
- text1 = '"This effect takes an image and adds a scrolling Image"'
- text2 = '"on the top and bottom of the screen. Each can scroll"'
- text3 = '"in different directions and be different images. Both"'
- text4 = '"will also have a beveled edge whose color is selected"'
- text5 = '"by the user as well. "'
-
- 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 = 'END'
- NewComplexRequest '"Instructions For Effect #09"' Gadget 400 56
-
- return
-
-