While your looking at a UPS, don't forget to get one big enough to cope with your monitor too.
Its really hard to save stuff when you cannot see what your doing.
I have a 300w UPS that goes beserk when the mains fails, because I'm using a 21" monitor & am just over the limit of the UPS. Gives me a minute or two in which to save & shutdown though.
Automatic scripts are only any good if you know how to write them.