The slit lamp microscope is the most popular opthalmologic instrument comprising a microscope with a light source attached to it. The coupling of microscope and light source distinguishes it from other optical devices. In this paper an Auto Focus system is proposed that considers this mechanical coupling and compensates for movements of the patient. It tracks the patients eye during the focusing process and applies a robust contrast-measurement algorithm to an area relative to it. The proposed method proved to be very accurate, reliable and stable, even starting from very defocused positions.