home *** CD-ROM | disk | FTP | other *** search
/ Visual FX for Image FX / VisualFX for Image FX 3.adf / Files / SetUp / 03 / 03.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1997-07-31  |  18.0 KB  |  809 lines

  1. /*
  2.                                  Visual FX
  3.                                     For
  4.                                  Image FX
  5.                                SetUp Script
  6.                            Written By J.L. White
  7.  
  8.                          (C)1997 Merlin's Software
  9.  
  10. */
  11.  
  12. parse arg Num Frames
  13. options results
  14. address "IMAGEFX.1"
  15.     ReDraw On
  16.     RequestResponse "Do You Need Instructions?"
  17.     if rc = 0 then do
  18.         call Docs()
  19.         end    
  20. if exists("libs:flyer.library") then do
  21.     if (POS('PROJECT_REXX_PORT',SHOW('Ports')) =0) then do
  22.         RequestNotify 'Flyer Must Be Running First!'
  23.         exit
  24.         end
  25.     call OpenFlyStuff()
  26.  
  27.  
  28.     Gadget.1 = 'D/110/22/120/ImageA Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
  29.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  30.     if rc ~= 0 then do
  31.         call CloseStuff()
  32.         exit 0
  33.         end
  34.     else do
  35.         IAType = RESULT.1
  36.            end
  37.  
  38.     call GetA()
  39.  
  40.  
  41.     Gadget.1 = 'D/110/22/120/ImageB Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
  42.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  43.     if rc ~= 0 then do
  44.         call CloseStuff()
  45.         exit 0
  46.         end
  47.     else do
  48.         IBType = RESULT.1
  49.            end
  50.  
  51.     call GetB()
  52.  
  53.  
  54.     Gadget.1 = 'D/110/22/120/ImageC Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
  55.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  56.     if rc ~= 0 then do
  57.         call CloseStuff()
  58.         exit 0
  59.         end
  60.     else do
  61.         ICType = RESULT.1
  62.            end
  63.  
  64.     call GetC()
  65.  
  66.  
  67.     Gadget.1 = 'D/110/22/120/ImageD Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
  68.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  69.     if rc ~= 0 then do
  70.         call CloseStuff()
  71.         exit 0
  72.         end
  73.     else do
  74.         IDType = RESULT.1
  75.            end
  76.  
  77.     call GetD()
  78.  
  79.     Fifth = 0
  80.     RequestResponse "Do You Want A 5th Image In The Middle?"
  81.     if rc = 0 then do
  82.         Fifth = 1
  83.         Gadget.1 = 'D/110/22/120/ImageE Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
  84.         ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  85.         if rc ~= 0 then do
  86.             call CloseStuff()
  87.             exit 0
  88.             end
  89.         else do
  90.             IEType = RESULT.1
  91.                end
  92.  
  93.         call GetE()
  94.         RequestResponse "Do You Want A Shadow On The 5th Image?"
  95.         if rc = 0 then Shadow = 1
  96.         else Shadow = 0
  97.         end
  98.  
  99. end
  100. else do
  101.     Gadget.1 = 'D/110/22/120/ImageA Type/2/FRAME/SEQUENCE'
  102.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  103.     if rc ~= 0 then do
  104.         call CloseStuff()
  105.         exit 0
  106.         end
  107.     else do
  108.         IAType = RESULT.1+2
  109.            end
  110.  
  111.     call GetA()
  112.  
  113.     Gadget.1 = 'D/110/22/120/ImageB Type/2/FRAME/SEQUENCE'
  114.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  115.     if rc ~= 0 then do
  116.         call CloseStuff()
  117.         exit 0
  118.         end
  119.     else do
  120.         IBType = RESULT.1+2
  121.            end
  122.  
  123.     call GetB()
  124.  
  125.     Gadget.1 = 'D/110/22/120/ImageC Type/2/FRAME/SEQUENCE'
  126.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  127.     if rc ~= 0 then do
  128.         call CloseStuff()
  129.         exit 0
  130.         end
  131.     else do
  132.         ICType = RESULT.1+2
  133.            end
  134.  
  135.     call GetC()
  136.  
  137.     Gadget.1 = 'D/110/22/120/ImageD Type/2/FRAME/SEQUENCE'
  138.     ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  139.     if rc ~= 0 then do
  140.         call CloseStuff()
  141.         exit 0
  142.         end
  143.     else do
  144.         IDType = RESULT.1+2
  145.            end
  146.  
  147.     call GetD()
  148.  
  149.  
  150.     Fifth = 0
  151.     RequestResponse "Do You Want A 5th Image In The Middle?"
  152.     if rc = 0 then do
  153.         Fifth = 1
  154.         Gadget.1 = 'D/110/22/120/ImageE Type/2/FRAME/SEQUENCE'
  155.         ComplexRequest  '"Visual FX  SetUp Options"' 1 Gadget 250 60
  156.         if rc ~= 0 then do
  157.             call CloseStuff()
  158.             exit 0
  159.             end
  160.         else do
  161.             IEType = RESULT.1+2
  162.                end
  163.     
  164.         call GetE()
  165.         RequestResponse "Do You Want A Shadow On The 5th Image?"
  166.         if rc = 0 then Shadow = 1
  167.         else Shadow = 0
  168.         end
  169. end
  170.  
  171.     CropAnswerA = "None"
  172.     RequestResponse "Does ImageA Need To Be Cropped?"
  173.     if rc = 0 then do
  174.         call LoadA()
  175.         call CropPic()
  176.         CropAnswerA = CropAnswer
  177.         end    
  178.  
  179.     CropAnswerB = "None"
  180.     RequestResponse "Does ImageB Need To Be Cropped?"
  181.     if rc = 0 then do
  182.         call LoadB()
  183.         call CropPic()
  184.         CropAnswerB = CropAnswer
  185.         end    
  186.  
  187.     CropAnswerC = "None"
  188.     RequestResponse "Does ImageC Need To Be Cropped?"
  189.     if rc = 0 then do
  190.         call LoadC()
  191.         call CropPic()
  192.         CropAnswerC = CropAnswer
  193.         end    
  194.  
  195.     CropAnswerD = "None"
  196.     RequestResponse "Does ImageD Need To Be Cropped?"
  197.     if rc = 0 then do
  198.         call LoadD()
  199.         call CropPic()
  200.         CropAnswerD = CropAnswer
  201.         end    
  202.  
  203.     if Fifth = 1 then do
  204.         CropAnswerE = "None"
  205.         RequestResponse "Does ImageE Need To Be Cropped?"
  206.         if rc = 0 then do
  207.             call LoadE()
  208.             call CropPic()
  209.             CropAnswerE = CropAnswer
  210.             end    
  211.         end
  212.  
  213.         RequestResponse "Do You Want Beveled Edges?"
  214.         if rc = 0 then do
  215.             Bevel = 1
  216.             RequestSlider '"Enter Thickness Of Bevel!"' 1 30 10
  217.             BevelNum = Result
  218.             end
  219.         else do
  220.             Bevel = 0
  221.             BevelNum = 0
  222.             end
  223. if FlyOn = 1 then
  224.     call CloseStuff()
  225.  
  226. call open TempFile,"VFXIFX:TempDrawer/"strip(Num),W
  227. call writeln TempFile,PicAName
  228. call writeln TempFile,Start
  229. call writeln TempFile,End
  230. call writeln TempFile,IAType
  231. call writeln TempFile,CropAnswerA
  232. call writeln TempFile,PicBName
  233. call writeln TempFile,StartB
  234. call writeln TempFile,EndB
  235. call writeln TempFile,IBType
  236. call writeln TempFile,CropAnswerB
  237. call writeln TempFile,PicCName
  238. call writeln TempFile,StartC
  239. call writeln TempFile,EndC
  240. call writeln TempFile,ICType
  241. call writeln TempFile,CropAnswerC
  242. call writeln TempFile,PicDName
  243. call writeln TempFile,StartD
  244. call writeln TempFile,EndD
  245. call writeln TempFile,IDType
  246. call writeln TempFile,CropAnswerD
  247. call writeln TempFile,Fifth
  248. call writeln TempFile,Shadow
  249. call writeln TempFile,PicEName
  250. call writeln TempFile,StartE
  251. call writeln TempFile,EndE
  252. call writeln TempFile,IEType
  253. call writeln TempFile,CropAnswerE
  254. call writeln TempFile,Bevel
  255. call writeln TempFile,BevelNum
  256. call close TempFile
  257. exit
  258.  
  259. Docs:
  260.     text1 = '"This effect places four separate images or clips in"'
  261.     text2 = '"the four corners of the screen. This can be any kind"'
  262.     text3 = '"of combination of clips, frames, sequences, etc. The"'
  263.     text4 = '"length of the effect is based on ImageA. All other"'
  264.     text5 = '"Images will be based on this length. You also have a"'
  265.     text6 = '"choice to place a fifth Image in the middle that will"'
  266.     text7 = '"overlap the others."'
  267.  
  268.     Gadget.1  = 'TEXT LE=10 TE=4 LB='text1' '
  269.     Gadget.2  = 'TEXT LE=10 TE=14 LB='text2' '
  270.     Gadget.3  = 'TEXT LE=10 TE=24 LB='text3' '
  271.     Gadget.4  = 'TEXT LE=10 TE=34 LB='text4' '
  272.     Gadget.5  = 'TEXT LE=10 TE=44 LB='text5' '
  273.     Gadget.6  = 'TEXT LE=10 TE=54 LB='text6' '
  274.     Gadget.7  = 'TEXT LE=10 TE=64 LB='text7' '
  275.     Gadget.8= 'END'
  276.     NewComplexRequest  '"Instructions For Effect #03"' Gadget 394 76
  277. return
  278.  
  279.  
  280. GetPathName: procedure  
  281.    parse ARG CompleteName
  282.    c = lastpos("/",CompleteName)
  283.    if c = 0 then c = lastpos(":",CompleteName)
  284.    return left(CompleteName,c)
  285.  
  286.  
  287.  
  288. CropPic:
  289.     Learn "RAM:VFX" NoHeader Quiet Force
  290.     Crop
  291.     Learn Stop Quiet Force
  292.  
  293.     call open TempFile,"RAM:VFX.ifx",R
  294.     do until eof(TempFile)
  295.         line = readln(TempFile)
  296.         parse var line StartLine" "RestOfLine
  297.         if StartLine = "Crop" then CropAnswer = line
  298.         end
  299.     call close TempFile
  300.     address command "Delete >NIL: Ram:VFX.ifx"
  301. return
  302.  
  303. GetFile:
  304.     parse Arg Title, Path
  305.     Address FLY_1 SetString Path
  306.     Address FLY_1 GetFileNameNT Title
  307. return result
  308.  
  309. GetFileName: procedure  
  310.    ARG CompleteName
  311.    c = lastpos("/",CompleteName)
  312.    if c = 0 then c = lastpos(":",CompleteName)
  313.    return substr(CompleteName, c + 1)
  314.  
  315.  
  316. GetA:
  317.  if IAType = 0 then do
  318.     call Switcher(TOSW)
  319.     PicAName = GetFile("Select Flyer Clip For ImageA!  ",DriveName)
  320.     Name = GetFileName(PicAName)
  321.     if Name = "" then do
  322.         Address FLY_1 OK_TEXT " OK "
  323.         Title = "You Must Enter A Valid Clip Name To Use!"
  324.         Address FLY_1 FYINT Title
  325.         Address FLY_1 Quit
  326.         call Switcher(TOWB)
  327.         exit
  328.         end
  329.     Address FLY_1 SetFileName PicAName
  330.     Address FLY_1 GetClipLength PicAName
  331.     End = result
  332.     Start = 0
  333.     Address FLY_1 Program "5"
  334.     Address FLY_1 StartNum Start
  335.     Address FLY_1 EndNum End
  336.     Address FLY_1 CurrentNum "0"
  337.     Address FLY_1 GetTimeNT "Select A Range Of Frames To Process!"
  338.     Start = word(result,1)*2
  339.     End = word(result,2)*2
  340.     Start  = Start + 1
  341.     End = End +2
  342.     call addlib('PROJECT_REXX_PORT' , 0)
  343.     call addlib(TOASTERLIB,0)
  344.     call Switcher(TOWB)
  345.     address command "C:Wait 1"
  346.     ScreenToFront
  347.     end
  348.    if IAType = 1 then do
  349.     RequestFile '"Select Flyer Still For ImageA!"' DriveName ' '
  350.     PicAName = result
  351.     Name = GetFileName(PicAName)
  352.     if Name = "" then do
  353.         Title = "You Must Enter A Valid Name To Use!"
  354.         RequestNotify Title
  355.         if FlyOn = 1 then Address FLY_1 Quit
  356.         exit
  357.         end
  358.     RequestNumber '"Enter Number Of Frames To Process!"' Frames
  359.     End = result
  360.     Start = 1
  361.     end
  362.    if IAType = 2 then do
  363.     RequestFile '"Select FileName For ImageA!"' 'SYS:' ' '
  364.     PicAName = result
  365.     Name = GetFileName(PicAName)
  366.     if Name = "" then do
  367.         Title = "You Must Enter A Valid Name To Use!"
  368.         RequestNotify Title
  369.         if FlyOn = 1 then Address FLY_1 Quit
  370.         exit
  371.         end
  372.     RequestNumber '"Enter Number Of Frames To Process!"' Frames
  373.     End = result
  374.     Start = 1
  375.     end
  376.    if IAType = 3 then do
  377.     RequestFile '"Select BaseName For ImageA! "' 'SYS:' ' '
  378.     PicAName = result
  379.     Name = GetFileName(PicAName)
  380.     if Name = "" then do
  381.         Title = "You Must Enter A Valid Name To Use!"
  382.         RequestNotify Title
  383.         if FlyOn = 1 then Address FLY_1 Quit
  384.         exit
  385.         end
  386.     RequestNumber '"Enter Number Of Frames To Process!"' Frames
  387.     End = result
  388.     Start = 1
  389.     end
  390.  
  391.     DriveName = GetPathName(PicAName)
  392. return
  393.  
  394.  
  395. GetB:
  396.  if IBType = 0 then do
  397.     call Switcher(TOSW)
  398.     PicBName = GetFile("Select Flyer Clip For ImageB!  ",DriveName)
  399.     Name = GetFileName(PicBName)
  400.     if Name = "" then do
  401.         Address FLY_1 OK_TEXT " OK "
  402.         Title = "You Must Enter A Valid Clip Name To Use!"
  403.         Address FLY_1 FYINT Title
  404.         Address FLY_1 Quit
  405.         call Switcher(TOWB)
  406.         exit
  407.         end
  408.     Address FLY_1 SetFileName PicBName
  409.     Address FLY_1 GetClipLength PicBName
  410.     EndB = result
  411.     StartB = 0
  412.     Address FLY_1 Program "5"
  413.     Address FLY_1 StartNum StartB
  414.     Address FLY_1 EndNum EndB
  415.     Address FLY_1 CurrentNum "-1"
  416.     Address FLY_1 GetTimeNT "Select Frame To Start With For ImageB!"
  417.     StartB = word(result,1)*2
  418.     EndB = word(result,2)*2
  419.     StartB  = StartB + 1
  420.     EndB = EndB +2
  421.     call addlib('PROJECT_REXX_PORT' , 0)
  422.     call addlib(TOASTERLIB,0)
  423.     call Switcher(TOWB)
  424.     address command "C:Wait 1"
  425.     ScreenToFront
  426.     end
  427.    if IBType = 1 then do
  428.     RequestFile '"Select Flyer Still For ImageB!"' DriveName ' '
  429.     PicBName = result
  430.     Name = GetFileName(PicBName)
  431.     if Name = "" then do
  432.         Title = "You Must Enter A Valid Name To Use!"
  433.         RequestNotify Title
  434.         if FlyOn = 1 then Address FLY_1 Quit
  435.         exit
  436.         end
  437.     EndB = Frames
  438.     StartB = 1
  439.     end
  440.    if IBType = 2 then do
  441.     RequestFile '"Select FileName For ImageB!"' 'SYS:' ' '
  442.     PicBName = result
  443.     Name = GetFileName(PicBName)
  444.     if Name = "" then do
  445.         Title = "You Must Enter A Valid Name To Use!"
  446.         RequestNotify Title
  447.         if FlyOn = 1 then Address FLY_1 Quit
  448.         exit
  449.         end
  450.     EndB = Frames
  451.     StartB = 1
  452.     end
  453.    if IBType = 3 then do
  454.     RequestFile '"Select BaseName For ImageB! "' 'SYS:' ' '
  455.     PicBName = result
  456.     Name = GetFileName(PicBName)
  457.     if Name = "" then do
  458.         Title = "You Must Enter A Valid Name To Use!"
  459.         RequestNotify Title
  460.         if FlyOn = 1 then Address FLY_1 Quit
  461.         exit
  462.         end
  463.     EndB = Frames
  464.     StartB = 1
  465.     end
  466.     DriveName = GetPathName(PicBName)
  467. return
  468.  
  469.  
  470.  
  471. GetC:
  472.  if ICType = 0 then do
  473.     call Switcher(TOSW)
  474.     PicCName = GetFile("Select Flyer Clip For ImageC!  ",DriveName)
  475.     Name = GetFileName(PicCName)
  476.     if Name = "" then do
  477.         Address FLY_1 OK_TEXT " OK "
  478.         Title = "You Must Enter A Valid Clip Name To Use!"
  479.         Address FLY_1 FYINT Title
  480.         Address FLY_1 Quit
  481.         call Switcher(TOWB)
  482.         exit
  483.         end
  484.     Address FLY_1 SetFileName PicCName
  485.     Address FLY_1 GetClipLength PicCName
  486.     EndC = result
  487.     StartC = 0
  488.     Address FLY_1 Program "5"
  489.     Address FLY_1 StartNum StartC
  490.     Address FLY_1 EndNum EndC
  491.     Address FLY_1 CurrentNum "-1"
  492.     Address FLY_1 GetTimeNT "Select Frame To Start With For ImageC!"
  493.     StartC = word(result,1)*2
  494.     EndC = word(result,2)*2
  495.     StartC  = StartC + 1
  496.     EndC = EndC +2
  497.     call addlib('PROJECT_REXX_PORT' , 0)
  498.     call addlib(TOASTERLIB,0)
  499.     call Switcher(TOWB)
  500.     address command "C:Wait 1"
  501.     ScreenToFront
  502.     end
  503.    if ICType = 1 then do
  504.     RequestFile '"Select Flyer Still For ImageC!"' DriveName ' '
  505.     PicCName = result
  506.     Name = GetFileName(PicCName)
  507.     if Name = "" then do
  508.         Title = "You Must Enter A Valid Name To Use!"
  509.         RequestNotify Title
  510.         if FlyOn = 1 then Address FLY_1 Quit
  511.         exit
  512.         end
  513.     EndC = Frames
  514.     StartC = 1
  515.     end
  516.    if ICType = 2 then do
  517.     RequestFile '"Select FileName For ImageC!"' 'SYS:' ' '
  518.     PicCName = result
  519.     Name = GetFileName(PicCName)
  520.     if Name = "" then do
  521.         Title = "You Must Enter A Valid Name To Use!"
  522.         RequestNotify Title
  523.         if FlyOn = 1 then Address FLY_1 Quit
  524.         exit
  525.         end
  526.     EndC = Frames
  527.     StartC = 1
  528.     end
  529.    if ICType = 3 then do
  530.     RequestFile '"Select BaseName For ImageC! "' 'SYS:' ' '
  531.     PicCName = result
  532.     Name = GetFileName(PicCName)
  533.     if Name = "" then do
  534.         Title = "You Must Enter A Valid Name To Use!"
  535.         RequestNotify Title
  536.         if FlyOn = 1 then Address FLY_1 Quit
  537.         exit
  538.         end
  539.     EndC = Frames
  540.     StartC = 1
  541.     end
  542.  
  543.     DriveName = GetPathName(PicCName)
  544. return
  545.  
  546.  
  547. GetD:
  548.  if IDType = 0 then do
  549.     call Switcher(TOSW)
  550.     PicDName = GetFile("Select Flyer Clip For ImageD!  ",DriveName)
  551.     Name = GetFileName(PicDName)
  552.     if Name = "" then do
  553.         Address FLY_1 OK_TEXT " OK "
  554.         Title = "You Must Enter A Valid Clip Name To Use!"
  555.         Address FLY_1 FYINT Title
  556.         Address FLY_1 Quit
  557.         call Switcher(TOWB)
  558.         exit
  559.         end
  560.     Address FLY_1 SetFileName PicDName
  561.     Address FLY_1 GetClipLength PicDName
  562.     EndD = result
  563.     StartD = 0
  564.     Address FLY_1 Program "5"
  565.     Address FLY_1 StartNum StartD
  566.     Address FLY_1 EndNum EndD
  567.     Address FLY_1 CurrentNum "-1"
  568.     Address FLY_1 GetTimeNT "Select Frame To Start With For ImageD!"
  569.     StartD = word(result,1)*2
  570.     EndD = word(result,2)*2
  571.     StartD  = StartD + 1
  572.     EndD = EndD +2
  573.     call addlib('PROJECT_REXX_PORT' , 0)
  574.     call addlib(TOASTERLIB,0)
  575.     call Switcher(TOWB)
  576.     address command "C:Wait 1"
  577.     ScreenToFront
  578.     end
  579.    if IDType = 1 then do
  580.     RequestFile '"Select Flyer Still For ImageD!"' DriveName ' '
  581.     PicDName = result
  582.     Name = GetFileName(PicDName)
  583.     if Name = "" then do
  584.         Title = "You Must Enter A Valid Name To Use!"
  585.         RequestNotify Title
  586.         if FlyOn = 1 then Address FLY_1 Quit
  587.         exit
  588.         end
  589.     EndD = Frames
  590.     StartD = 1
  591.     end
  592.    if IDType = 2 then do
  593.     RequestFile '"Select FileName For ImageD!"' 'SYS:' ' '
  594.     PicDName = result
  595.     Name = GetFileName(PicDName)
  596.     if Name = "" then do
  597.         Title = "You Must Enter A Valid Name To Use!"
  598.         RequestNotify Title
  599.         if FlyOn = 1 then Address FLY_1 Quit
  600.         exit
  601.         end
  602.     EndD = Frames
  603.     StartD = 1
  604.     end
  605.    if IDType = 3 then do
  606.     RequestFile '"Select BaseName For ImageD! "' 'SYS:' ' '
  607.     PicDName = result
  608.     Name = GetFileName(PicDName)
  609.     if Name = "" then do
  610.         Title = "You Must Enter A Valid Name To Use!"
  611.         RequestNotify Title
  612.         if FlyOn = 1 then Address FLY_1 Quit
  613.         exit
  614.         end
  615.     EndD = Frames
  616.     StartD = 1
  617.     end
  618.  
  619.     DriveName = GetPathName(PicDName)
  620. return
  621.  
  622.  
  623. GetE:
  624.  if IEType = 0 then do
  625.     call Switcher(TOSW)
  626.     PicEName = GetFile("Select Flyer Clip For ImageE!  ",DriveName)
  627.     Name = GetFileName(PicEName)
  628.     if Name = "" then do
  629.         Address FLY_1 OK_TEXT " OK "
  630.         Title = "You Must Enter A Valid Clip Name To Use!"
  631.         Address FLY_1 FYINT Title
  632.         Address FLY_1 Quit
  633.         call Switcher(TOWB)
  634.         exit
  635.         end
  636.     Address FLY_1 SetFileName PicEName
  637.     Address FLY_1 GetClipLength PicEName
  638.     EndE = result
  639.     StartE = 0
  640.     Address FLY_1 Program "5"
  641.     Address FLY_1 StartNum StartE
  642.     Address FLY_1 EndNum EndE
  643.     Address FLY_1 CurrentNum "-1"
  644.     Address FLY_1 GetTimeNT "Select Frame To Start With For ImageE!"
  645.     StartE = word(result,1)*2
  646.     EndE = word(result,2)*2
  647.     StartE  = StartE + 1
  648.     EndE = EndE +2
  649.     call addlib('PROJECT_REXX_PORT' , 0)
  650.     call addlib(TOASTERLIB,0)
  651.     call Switcher(TOWB)
  652.     address command "C:Wait 1"
  653.     ScreenToFront
  654.     end
  655.    if IEType = 1 then do
  656.     RequestFile '"Select Flyer Still For ImageE!"' DriveName ' '
  657.     PicEName = result
  658.     Name = GetFileName(PicEName)
  659.     if Name = "" then do
  660.         Title = "You Must Enter A Valid Name To Use!"
  661.         RequestNotify Title
  662.         if FlyOn = 1 then Address FLY_1 Quit
  663.         exit
  664.         end
  665.     EndE = Frames
  666.     StartE = 1
  667.     end
  668.    if IEType = 2 then do
  669.     RequestFile '"Select FileName For ImageE!"' 'SYS:' ' '
  670.     PicEName = result
  671.     Name = GetFileName(PicEName)
  672.     if Name = "" then do
  673.         Title = "You Must Enter A Valid Name To Use!"
  674.         RequestNotify Title
  675.         if FlyOn = 1 then Address FLY_1 Quit
  676.         exit
  677.         end
  678.     EndE = Frames
  679.     StartE = 1
  680.     end
  681.    if IEType = 3 then do
  682.     RequestFile '"Select BaseName For ImageE! "' 'SYS:' ' '
  683.     PicEName = result
  684.     Name = GetFileName(PicEName)
  685.     if Name = "" then do
  686.         Title = "You Must Enter A Valid Name To Use!"
  687.         RequestNotify Title
  688.         if FlyOn = 1 then Address FLY_1 Quit
  689.         exit
  690.         end
  691.     EndE = Frames
  692.     StartE = 1
  693.     end
  694. return
  695.  
  696.  
  697. CloseStuff:
  698.     Address FLY_1 Quit
  699.     call remlib('ToasterARexx.port')
  700.     call remlib('PROJECT_REXX_PORT')
  701. return
  702.  
  703.  
  704. OpenFlyStuff:
  705.     FlyOn = 1
  706.     address command "run VFXIFX:FLY" 
  707.     do while (POS('FLY_1',SHOW('Ports')) = 0)
  708.         address command "wait 1"
  709.         end
  710.     TOASTERLIB="ToasterARexx.port"
  711.     call remlib('ToasterARexx.port')
  712.     call remlib('PROJECT_REXX_PORT')
  713.     call addlib('PROJECT_REXX_PORT' , 0)
  714.     call addlib(TOASTERLIB,0)
  715.     DriveName = FindDrive()
  716. return
  717.  
  718.  
  719. FindDrive:
  720.     address command "C:Info >RAM:DriveList"
  721.     call open TempFile,"RAM:DriveList",R
  722.     do until eof(TempFile)
  723.         line = readln(TempFile)
  724.         parse var line Drive" "Rest
  725.         if Drive = "FA0:" then 
  726.             FlyVolume = word(Rest,7)":"
  727.     end
  728.     call close TempFile
  729.     address command "Delete >NIL: RAM:DriveList"
  730. return FlyVolume
  731.  
  732. LoadA:
  733.     if IAType = 0 then do
  734.         LoadBuffer PicAName Force Start
  735.         end
  736.     if IAType = 1 then do
  737.         LoadBuffer PicAName Force 1
  738.         end
  739.     if IAType = 2 then do
  740.         LoadBuffer PicAName Force
  741.         end
  742.     if IAType = 3 then do
  743.         LoadBuffer PicAName""right(Start,3,'0') Force
  744.         end
  745. return
  746.  
  747. LoadB:
  748.     if IBType = 0 then do
  749.         LoadBuffer PicBName Force StartB
  750.         end
  751.     if IBType = 1 then do
  752.         LoadBuffer PicBName Force 1
  753.         end
  754.     if IBType = 2 then do
  755.         LoadBuffer PicBName Force
  756.         end
  757.     if IBType = 3 then do
  758.         LoadBuffer PicBName""right(StartB,3,'0') Force
  759.         end
  760. return
  761.  
  762. LoadC:
  763.     if ICType = 0 then do
  764.         LoadBuffer PicCName Force StartC
  765.         end
  766.     if ICType = 1 then do
  767.         LoadBuffer PicCName Force 1
  768.         end
  769.     if ICType = 2 then do
  770.         LoadBuffer PicCName Force
  771.         end
  772.     if ICType = 3 then do
  773.         LoadBuffer PicCName""right(StartC,3,'0') Force
  774.         end
  775. return
  776.  
  777. LoadD:
  778.     if IDType = 0 then do
  779.         LoadBuffer PicDName Force StartD
  780.         end
  781.     if IDType = 1 then do
  782.         LoadBuffer PicDName Force 1
  783.         end
  784.     if IDType = 2 then do
  785.         LoadBuffer PicDName Force
  786.         end
  787.     if IDType = 3 then do
  788.         LoadBuffer PicDName""right(StartD,3,'0') Force
  789.         end
  790. return
  791.  
  792. LoadE:
  793.     if IEType = 0 then do
  794.         LoadBuffer PicEName Force StartE
  795.         end
  796.     if IEType = 1 then do
  797.         LoadBuffer PicEName Force 1
  798.         end
  799.     if IEType = 2 then do
  800.         LoadBuffer PicEName Force
  801.         end
  802.     if IEType = 3 then do
  803.         LoadBuffer PicEName""right(StartE,3,'0') Force
  804.         end
  805. return
  806.  
  807.  
  808.  
  809.