home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDG-CT1.DMS / in.adf / CT.run / Scripts2 / 5 / Subtract_Image < prev    next >
Encoding:
Text File  |  1995-10-17  |  1.9 KB  |  87 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=Subtract Image
  8. 02= 
  9. 03=This script loads each image of the File List Window
  10. 04=into ImageFX and merges the image with another by
  11. 05=preforming an arithmetic combination of the two.
  12.  
  13.  
  14. */
  15.  
  16. options results
  17.  
  18. arg FrameNum TotalFiles
  19. address "IMAGEFX.1"
  20.  
  21. if FrameNum = 0 then do
  22.     FrameNum = 1
  23.     Gadget.1 = 'Select Type For Merge!'
  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 Merge!"'
  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 Merge!"'
  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.     Gadget.1 = 'Do You Want Swap Buffer Scaled To Fit?'
  50.     Gadget.2 = 'YES'
  51.     Gadget.3 = 'NO'
  52.     ListRequest 3 Gadget
  53.     Answer = ""
  54.     if result = 2 then Answer = "Scale"
  55.     call open TempFile,"Ram:CT-IFSUI",W
  56.     call writeln TempFile,Answer
  57.     call writeln TempFile,PicName
  58.     call writeln TempFile,Type
  59.     call writeln TempFile,Start
  60.     call close TempFile
  61.     end
  62. else do
  63.     call open TempFile,"Ram:CT-IFSUI",R
  64.     line = readln(TempFile)
  65.     parse var line Answer
  66.     line = readln(TempFile)
  67.     parse var line PicName
  68.     line = readln(TempFile)
  69.     parse var line Type
  70.     line = readln(TempFile)
  71.     parse var line Start
  72.     call close TempFile
  73.     end
  74.  
  75. Swap
  76. if Type = "CLIP" then
  77.     LoadBuffer PicName FrameNum Force
  78. if Type = "IMAGE" then
  79.     LoadBuffer PicName Force
  80. if Type = "SEQUENCE" then
  81.     LoadBuffer PicName""right(FrameNum,3,'0') Force
  82. Swap
  83.  
  84. Subtract Answer
  85.  
  86. exit
  87.