In this paper, we report our experience in looking for effective autofocus functions for automatic image acquisition in ImmunoFluorescence Assay (IFA). We propose to use two functions that greatly improve the performance with respect to functions commonly proposed in the literature. The first function is based on the image histogram and it is suited to in the coarse phase of autofocus, when the z-axis steps are larger to speedup the identification of the interval where lies the focus position. The second function is a popular autofocus function properly modified to compensate the effects of photo-bleaching. It is best suited to be used in the other phases of the autofocus process when smaller steps are taken to precisely identify the focus position. Effectiveness of the proposed functions has been assessed on real images both quantitatively and qualitatively, confirming that they allow obtaining a high quality images, in most cases better than those manually acquired.