Well, this may be me not understanding the code behind it, but it seems to me that you would simply need to simulate a click at the original coordinates each time the tolerances are changed.
Anyway, doesn't Photoshop alter the selected area dynamically?