How can I get the current battery level using the cocoa framework running with Leopard?
Currently I am getting it running a NSTask with:
pmset -g ps | grep -o -e [0-9]*% | sed -e 's/%//g'
But i think this is a clumsy way of doing this.
Thanks
How can I get the current battery level using the cocoa framework running with Leopard?
Currently I am getting it running a NSTask with:
pmset -g ps | grep -o -e [0-9]*% | sed -e 's/%//g'
But i think this is a clumsy way of doing this.
Thanks
Take a look at: http://forums.macrumors.com/showthread.php?t=474628
I believe this question has been asked here before... Here's some links:
http://stackoverflow.com/questions/272552/battery-status-in-osx (asked here before)
It limited my number of links because I'm new... but you should find more links there