I've been working on a script that takes care of tuning flavour of magic optimally for me automatically and a couple people expressed interest, so I guess I'm sharing it with the world!
By default, it will set you to whatever element will be super effective against the most enemies in the zone...