Any of you horse botherers know XML? I've a mate who has a question. Is there a bit of code he can stick into something that will tell him if his laptop is on battery or mains?
Cheers!
XML codery
Moderator: Forum Moderators
XML isn't code, it's just a way of storing data in a simple format. Are you looking for a way to output the power status as XML?
edit: This is an AutoIt script to get the power status. Possibly it can be adapted for use. http://www.autoitscript.com/forum/index ... ntry698577
(especially see 'GetSystemPowerStatus' from the Windows kernal.)
edit: This is an AutoIt script to get the power status. Possibly it can be adapted for use. http://www.autoitscript.com/forum/index ... ntry698577
(especially see 'GetSystemPowerStatus' from the Windows kernal.)
Well, he has some DJ software and he's been altering the appearance and settings of it. He's put something similar in for CPU (he didn't explain what about CPU), but what he asked is pretty much what I've posted. I know nothing about XML myself. Oh, he did also say he'd used 'XML' to put Michael Jackson heads on all the zombies in Plants Vs Zombies.
Anyway, I'll show him that and see if it helps. Ta!
Anyway, I'll show him that and see if it helps. Ta!
-
ProfHawking
- Zombie

- Posts: 2101
- Joined: February 20th, 2005, 21:31
yar, its often used for settings files and stuff, so if he edited a file saying swap this pic for that pic, that would have worked.
I think the answer to this question is most likely going to be closely related to the application he is trying to use it for. If we know more about what needs to know about the battery, and how it can look for the status, it would be easier to provide a method.
Personally, i'd take a look at vbscript, i think you can get that to hook into the system and dig out power info, but you shouldnt need any extra applications to run it.
I think the answer to this question is most likely going to be closely related to the application he is trying to use it for. If we know more about what needs to know about the battery, and how it can look for the status, it would be easier to provide a method.
Personally, i'd take a look at vbscript, i think you can get that to hook into the system and dig out power info, but you shouldnt need any extra applications to run it.

