Analysis of medium resolution spectra by automated methods - Application to M 55 and ω Centauri