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

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5. Lines=8
  6. 01=Split Screen
  7. 02= 
  8. 03=This script loads each image of the File List Window
  9. 04=into ImageFX and allows the user to add another image
  10. 05=or clip any where on the screen. This is great for doing
  11. 06=split images with one on the left and one on the right.
  12. 07=This does not resize the image it just shows through in
  13. 08=the rectangle area you select.
  14.  
  15. */
  16.  
  17. options results
  18.  
  19. arg FrameNum TotalFiles
  20. address "IMAGEFX.1"
  21.  
  22. Start = 0
  23. if FrameNum = 0 then do
  24.     FrameNum = 1
  25.     Gadget.1 = 'Select Type For 2nd Image!'
  26.     Gadget.2 = 'IMAGE'
  27.     Gadget.3 = 'SEQUENCE'
  28.     Gadget.4 = 'CLIP'
  29.     ListRequest 4 Gadget
  30.     if result = 2 then Type = "IMAGE"
  31.     if result = 3 then Type = "SEQUENCE"
  32.     if result = 4 then Type = "CLIP"
  33.  
  34.     if Type = "SEQUENCE" then do
  35.         RequestFile '"Select Path & BaseName For 2nd Image!"'
  36.         PicName = result
  37.         RequestNumber '"Select Frame Number To Start With!"' 1
  38.         Start = result-1
  39.         end
  40.     else do
  41.         RequestFile '"Select File To Use For 2nd Image!"'
  42.         PicName = result
  43.         end
  44.  
  45.     if Type = "CLIP" then do
  46.         Address CT_1 GetClipLength PicName
  47.         Start = result
  48.         RequestSlider '"Start With What Frame Of Clip!"' 1 Start 1
  49.         Start = result-1
  50.         end
  51.     KillBrush
  52.     call PickBox()
  53.  
  54.     call open TempFile,"RAM:CT-IFSS",W
  55.     call writeln TempFile,Answer
  56.     call writeln TempFile,PicName
  57.     call writeln TempFile,Type
  58.     call writeln TempFile,Start
  59.     call close TempFile
  60.     end
  61. else do
  62.     call open TempFile,"RAM:CT-IFSS",R
  63.     line = readln(TempFile)
  64.     parse var line X1 Y1 X2 Y2
  65.     line = readln(TempFile)
  66.     parse var line PicName
  67.     line = readln(TempFile)
  68.     parse var line Type
  69.     line = readln(TempFile)
  70.     parse var line Start
  71.     call close TempFile
  72.     end
  73.  
  74. DrawMode Normal
  75. ActiveColor 1
  76. GetMain
  77. parse var result Name Width Height Blah
  78. AlphaChannel Off
  79. FrameNum = FrameNum + Start
  80. Swap
  81. if Type = "CLIP" then
  82.     LoadBuffer PicName Force FrameNum
  83. if Type = "IMAGE" then
  84.     LoadBuffer PicName Force
  85. if Type = "SEQUENCE" then do
  86.     if FrameNum < 1000 then
  87.         LoadBuffer PicName""right(FrameNum,3,'0') Force
  88.     if FrameNum < 10000 then
  89.         LoadBuffer PicName""right(FrameNum,4,'0') Force
  90.     end
  91. Swap
  92. DrawMode Normal
  93. DrawStyle RubThrough
  94. FilledBox X1 Y1 X2-X1 Y2-Y1
  95. DrawStyle Normal
  96.  
  97. exit
  98.  
  99.  
  100.  
  101. PickBox:
  102.     Menu ToolBox
  103.     RequestNotify "Draw Rectangle Where You Want 2nd Image To Show!"
  104.     DrawTool Box
  105.     HidePanel
  106.     Undo On
  107.     WaitFor SELECTDOWN
  108.     parse var result X1 Y1
  109.     WaitFor SELECTUP
  110.     parse var result X2 Y2
  111.     Undo
  112.     ShowPanel
  113.     Undo Off
  114.     X1 = strip(X1)
  115.     Y1 = strip(Y1)
  116.     X2 = strip(X2)
  117.     Y2 = strip(Y2)
  118.     Answer = X1" "Y1" "X2" "Y2
  119.     RequestResponse "Is The Box You Selected Correct?"
  120.     if rc ~= 0 then call PickBox()
  121.  
  122. return
  123.