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

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5.  
  6. Lines=5
  7. 01=User Defined Composite
  8. 02= 
  9. 03=This script loads each image of the File List Window
  10. 04=into ImageFX and brings up the Composite Hook to use
  11. 05=any options available to composite with another image.
  12.  
  13. */
  14.  
  15. options results
  16.  
  17. arg FrameNum TotalFiles
  18. address "IMAGEFX.1"
  19.  
  20. Start = 0
  21. if FrameNum = 0 then do
  22.     FrameNum = 1
  23.     Gadget.1 = 'Select Type For Composite!'
  24.     Gadget.2 = 'IMAGE'
  25.     Gadget.3 = 'SEQUENCE'
  26.     Gadget.4 = 'CLIP'
  27.     ListRequest 4 Gadget
  28.     if result = 2 then Type = "IMAGE"
  29.     if result = 3 then Type = "SEQUENCE"
  30.     if result = 4 then Type = "CLIP"
  31.  
  32.     if Type = "SEQUENCE" then do
  33.         RequestFile '"Select Path & BaseName For Composite Image!"'
  34.         PicName = result
  35.         RequestNumber '"Select Frame Number To Start With!"' 1
  36.         Start = result-1
  37.         end
  38.     else do
  39.         RequestFile '"Select File To Use For Composite Image!"'
  40.         PicName = result
  41.         end
  42.  
  43.     if Type = "CLIP" then do
  44.         Address CT_1 GetClipLength PicName
  45.         Start = result
  46.         RequestSlider '"Start With What Frame Of Clip!"' 1 Start 1
  47.         Start = result-1
  48.         end
  49.     call open TempFile,"RAM:CT-UDC2",W
  50.     call writeln TempFile,PicName
  51.     call writeln TempFile,Type
  52.     call writeln TempFile,Start
  53.     call close TempFile
  54.     Swap
  55.     FrameNum = FrameNum + Start
  56.     if Type = "CLIP" then
  57.         LoadBuffer PicName Force FrameNum
  58.     if Type = "IMAGE" then
  59.         LoadBuffer PicName Force
  60.     if Type = "SEQUENCE" then do
  61.     if FrameNum < 1000 then
  62.         LoadBuffer PicName""right(FrameNum,3,'0') Force
  63.     if FrameNum < 10000 then
  64.         LoadBuffer PicName""right(FrameNum,4,'0') Force
  65.         end
  66.     Swap
  67.     Learn "RAM:CT-IFUDC" NoHeader Quiet Force
  68.     Hook Composite
  69.     Learn Stop Quiet Force
  70.     end
  71. else do
  72.     call open TempFile,"RAM:CT-UDC2",R
  73.     line = readln(TempFile)
  74.     parse var line PicName
  75.     line = readln(TempFile)
  76.     parse var line Type
  77.     line = readln(TempFile)
  78.     parse var line Start
  79.     call close TempFile
  80.  
  81.     Swap
  82.     FrameNum = FrameNum + Start
  83.     if Type = "CLIP" then
  84.         LoadBuffer PicName Force FrameNum
  85.     if Type = "IMAGE" then
  86.         LoadBuffer PicName Force
  87.     if Type = "SEQUENCE" then do
  88.     if FrameNum < 1000 then
  89.         LoadBuffer PicName""right(FrameNum,3,'0') Force
  90.     if FrameNum < 10000 then
  91.         LoadBuffer PicName""right(FrameNum,4,'0') Force
  92.         end
  93.     Swap
  94.     if exists("RAM:CT-IFUDC.ifx") then address command "Rename Ram:CT-IFUDC.ifx to Ram:CT-IFUDC"
  95.     call open TempFile,"Ram:CT-IFUDC",R
  96.     do until eof(TempFile)
  97.         line = readln(TempFile)
  98.         parse var line Start" "RestOfLine
  99.         if Start = "Hook" then Answer = line
  100.         end
  101.     call close TempFile
  102.     Answer
  103.     end
  104.  
  105.  
  106. exit
  107.