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

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5. Lines=6
  6. 01=Polaroid Image
  7. 02= 
  8. 03=This script loads each image of the File List
  9. 04=Window into ImageFX and allows the user select
  10. 05=a background then redraws the image in the shape
  11. 06=of a Polaroid Picture.
  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 BackGround!'
  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 BackGround!"'
  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 BackGround!"'
  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.     RequestResponse "Do You Want To Add A Shadow?"
  50.     Answer2 = "YES"
  51.     if rc ~= 0 then Answer2 = "NO"
  52.     if Answer2 = "YES" then do
  53.         RequestSlider '"Enter Amount To Darken Shadow!"' 1 100 60
  54.         Answer3 = result
  55.         RequestResponse "Do You Want Soft Edge Shadows?"
  56.         Answer5 = "YES"
  57.         if rc ~= 0 then Answer6 = "NO"
  58.         if Answer5 = "YES" then do
  59.             RequestSlider '"Enter Amount To Feather Shadow!"' 1 50 5
  60.             Answer6 = Result
  61.             end
  62.         end
  63.  
  64.     call open TempFile,"RAM:CT-IFPP",W
  65.     call writeln TempFile,Answer2
  66.     call writeln TempFile,Answer3
  67.     call writeln TempFile,Answer5
  68.     call writeln TempFile,Answer6
  69.     call writeln TempFile,PicName
  70.     call writeln TempFile,Type
  71.     call writeln TempFile,Start
  72.     call close TempFile
  73.     end
  74. else do
  75.     call open TempFile,"RAM:CT-IFPP",R
  76.     line = readln(TempFile)
  77.     parse var line Answer2
  78.     line = readln(TempFile)
  79.     parse var line Answer3
  80.     line = readln(TempFile)
  81.     parse var line Answer5
  82.     line = readln(TempFile)
  83.     parse var line Answer6
  84.     line = readln(TempFile)
  85.     parse var line PicName
  86.     line = readln(TempFile)
  87.     parse var line Type
  88.     line = readln(TempFile)
  89.     parse var line Start
  90.     call close TempFile
  91.     end
  92.  
  93. ActiveColor 1
  94. DrawMode Normal
  95. DrawStyle Normal
  96. Pen 0 1
  97. Blend 100
  98. AlphaChannel Off
  99. EdgeMode Normal 0
  100. FillMode Solid 0 0 0 SMOOTH
  101. AirbrushSettings 5 50 0 Spray
  102.  
  103. GetMain
  104. parse var result Name Width Height Blah
  105. Scissors
  106. Region Brush
  107. DrawMode Normal
  108. Box 0 0 Width Height
  109.  
  110. FrameNum = FrameNum + Start
  111. if Type = "CLIP" then
  112.     LoadBuffer PicName Force FrameNum
  113. if Type = "IMAGE" then
  114.     LoadBuffer PicName Force
  115. if Type = "SEQUENCE" then do
  116.     if FrameNum < 1000 then
  117.         LoadBuffer PicName""right(FrameNum,3,'0') Force
  118.     if FrameNum < 10000 then
  119.         LoadBuffer PicName""right(FrameNum,4,'0') Force
  120.     end
  121.  
  122. call MakePic()
  123.  
  124. exit
  125.  
  126.  
  127.  
  128. MakePic:
  129.  
  130.     if Answer2 = "YES" then do
  131.         if Answer5 = "YES" then EdgeMode FeatherOut Answer6
  132.         ActiveColor 1
  133.         Blend Answer3
  134.         DrawMode Darken
  135.         FilledBox 144 76 514 369
  136.         EdgeMode Normal
  137.         end
  138.  
  139.     Blend 100
  140.     DrawMode Normal
  141.     ActiveColor 1
  142.     FilledBox 120 49 515 375
  143.     FillMode Warp 0 0 0 Smooth
  144.     FilledBox 142 68 472 298
  145.     FillMode Solid 0 0 0 SMOOTH
  146.     KillBrush
  147. return
  148.