Tiling Windows Script

Is there an applescript to arrange windows in a neat manner, assuming I have a max of 4 windows then can I arrange them nicely so they each take up a quarter of my screen?

Many thanks.