I have a MacBook (2008) that sleeps as soon as you put in a battery This MacBook runs perfectly without a battery. Putting in a genuine new and aa genuine used battery does the same thing. The screen goes dark, you can still see the screen for a second and then it's asleep.

Taking the battery out doesn't work after that. To reboot, the battery must come out. ONCE using the old battery that came with it (not the two I've been talking about), it booted up to a gray window with a thermometer bar as if it was waking from sleep. Then it died.

This is a fresh install of ML, so it's not software related. I tested both batteries in another macbook and they both are charged up.
Had similar problem, so took it to Genius Bar for investigation. Turned out to be the battery charger sensor module, which is built into the battery level indicator on the side of the Macbook (the 5 green light thing). It was malfunctioning, basically telling the Macbook that any battery was dead, even if the battery was good. YMMV.