Wouldn't that result in oddities should the ship evade the missile? And what if there are 2 or more ships within detonation range?
That's essentially what the mine does right now, except that an untargeted heatseeker may go towards something besides the closest target. In my testing, if the mine wasn't set to chase a specific target and simply an untargeted heat seeker, a fighter could activate the mine which would then go happily chasing a capital ship much farther away.
This way, the mine will home in on whatever got in range and activated it from a piddly fighter to a huge destroyer. I give the weapon a lifetime of 60 seconds so you can evade it, or even better, drag it over to something else that explodes

As to your second question, I believe that if two targets are in range when the mine goes active, the mine will go after the first one in the ship index.
Mobius, I sent you a PM with the script and the details.