"FT" <[email protected]> wrote in message
news:2B602B53D89E450ABF2B9DA00081CE1B@1B1B1L1...
>
> Hi Mark,
>
> I could not find using Google any information on how to get the Laptop
> Battery Level information so I could have my Screen Reader Or voices from
> Sapi to talk the information.
> So, I would need the modules or a sample code that fetches the data
> from that location on the screen.
> I figure I could study the code and learn how to do it after getting
> the information.
> I have already posted information on other lists about using PYTTS but
> would like to have information on getting batter info and work up from
> there.
>
> Sincerely
> Bruce
You can use WMI to get the battery level.
import win32com.client
wmi=win32com.client.GetObject('winmgmts:')
b=wmi.InstancesOf('win32_battery')
print b[0].EstimatedChargeRemaining
Roger
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32