You might find this useful:
http://www.subsim.com/radioroom/down...o=file&id=1536
Or more flexible:
http://www.subsim.com/radioroom/showthread.php?t=165794
One of the scripts allows you to remove all the units that do not enter a specified area. You just have to provide the longitude and latitude of the area.
Cheers, LGN1