In order to measure automatically the equivalent width of the Balmer lines in a database of 40,000 atmosphere models, we have developed a program that mimics the work of an astronomer in terms of identifying and eliminating secondary spectral lines mixed with the Balmer lines. The equivalent widths measured have average errors of 5 percent, which makes them very reliable. As part of the FITspec code, this program improves the automatic adjustment of an atmosphere model to the observed spectrum of a massive star.