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

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5.  
  6. Lines=6
  7. 01=Remove Feature From Image
  8. 02= 
  9. 03=This script loads each image of the File List Window
  10. 04=into ImageFX and allows you to select a region of the
  11. 05=image and remove everything within it by pulling the
  12. 06=edges together.
  13. */
  14.  
  15. options results
  16.  
  17. arg Num TotalNum
  18. address "IMAGEFX.1"
  19. if Num = 0 then Num = 1
  20. if Num = 1 then
  21.     call PickBox()
  22. else
  23.     call GetSettings()
  24.  
  25. BoxRegion X1 Y1 X2 Y2
  26. RemoveFeature
  27.  
  28. exit
  29.  
  30.  
  31. GetSettings:
  32.     call open TempFile,"RAM:CT-IFRF",R
  33.     line = readln(TempFile)
  34.     parse var line X1 Y1 X2 Y2
  35.     call close TempFile
  36. return
  37.  
  38.  
  39. PickBox:
  40.     Menu ToolBox
  41.     RequestNotify "Draw Rectangle Where You Want Features Removed!"
  42.     DrawTool Box
  43.     HidePanel
  44.     Undo On
  45.     WaitFor SELECTDOWN
  46.     parse var result X1 Y1
  47.     WaitFor SELECTUP
  48.     parse var result X2 Y2
  49.     Undo
  50.     ShowPanel
  51.     Undo Off
  52.     X1 = strip(X1)
  53.     Y1 = strip(Y1)
  54.     X2 = strip(X2)
  55.     Y2 = strip(Y2)
  56.     Answer = X1" "Y1" "X2" "Y2
  57.     RequestResponse "Is The Box You Selected Correct?"
  58.     if rc ~= 0 then call PickBox()
  59.     call open TempFile,"RAM:CT-IFRF",W
  60.     call writeln TempFile,X1" "Y1" "X2" "Y2
  61.     call close TempFile
  62.  
  63. return
  64.