I just use the D3D9EX build which sets the optimal frame delay automatically.
That's not true.
All that D3D9ex does is skipping the frame queue, so that instead of having 3 frames of delay in D3D9, you only have 1.
*then* you have to play around with frame_delay to remove that last frame of lag.
A software which runs some game in benchmark mode with various frame delay value and set them accordingly would be a god send.
I'd know how to do this in Linux/Unix/Mac OS, but absolutely clueless if batch scripting allows for what I'd like to do in Windows.