Getting battery state using scripting??

Hi All.

Does anybodu know if it’s possible to get the battery state from a iBook/PB using scripting?

Either using AS directly, or by using do shell script??


There’s a great thread about this subject at Mac OS X Hints…
I haven’t tried it yet, but I’m sure you could create an AppleScript to automate the process.