Example from one of my scripts:
FindColorsSpiralTolerance(x, y, TPA, 10673123, mainScreen.getBounds(), 2, colorSetting(2, 0.26, 2.06));
ATPA := TPA.toATPA(20, 20);
ATPA.filterBetween(0, 3);
ATPA.sortFromMidPoint(mainscreen.playerPoint); // Sorts atpa from the closest to the farest one from the given point //(mainscreen.playerpoint), in your case you should change it to the point which should always be right on the screen so like
// point(500,250) would do fine if camera view is static.
if length(ATPA)<1 then exit;
smartImage.debugATPA(ATPA);
Statusas('Banking trying to catch bank from roof top');
for i := 0 to high(atpa) do
begin
mousebox(ATPA[i].getbouds(),mouse_left);
end;
Posting you actual banking procedure might help also. Hopefully you done use something like openbank() if you do then you need to change that function abit, just to insert sorting in a correct place.