Screening by automated high-throughput microscopy has become a valuable research tool. An essential component of such systems is the autonomous acquisition of focused images. Here we describe the implementation of a high-precision autofocus routine for imaging of fluorescently stained bacteria on a commercially available microscope. We integrate various concepts and strategies that together substantially enhance the performance of autonomous image acquisition. These are (i) nested focusing in brightfield and fluorescence illumination, (ii) autofocusing by continuous life-image acquisition during movement in z-direction rather than at distinct z-positions, (iii) assessment of the quality and topology of a field of view (FOV) by multi-spot focus measurements and (iv) acquisition of z-stacks and application of an extended depth of field algorithm to compensate for FOV unevenness. The freely provided program and documented source code allow ready adaptation of the here presented approach to various platforms and scientific questions.