XML codery

If you touch your software enough does it become hardware?

Moderator: Forum Moderators

Post Reply
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

XML codery

Post by Dog Pants »

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!
Stoat
Site Admin
Site Admin
Posts: 3291
Joined: October 8th, 2004, 15:48
Location: Sheffield, UK
Contact:

Post by Stoat »

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.)
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Post by Dog Pants »

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!
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

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.
Post Reply