The major problem - one of the many major problems with governing people is that of who you get to do it; or rather of who manages to get people to let them do it to them. To summarize: it is a well-known fact that those people who must want to rule people are, ipso facto, those least suited to do it. To summarize the summary: anyone who is capable of getting themselves made President should on no account be allowed to do the job.
- The Restaurant at the End of the Universe
::   Blog  ::   Photos  ::   Europe  ::   Books  ::   Articles  ::   Links  ::   Friends  ::   Combo Feed  ::   Mobile  ::    
Submit a story!
Need Help?

Powered by FeedBlitz

Most Popular
Download This American Life Episodes
An Experiment in Porn
Fuck For Forest
Leash gal sex pics
Japan and Atomic Bomb Effects

Random Entries:
GB #16 - Starting My Seeds!
The Effects of Globalization on Developing World Agricultural Systems
Dictionary ban? America is lost.
CarbonFund.org
Gitmo detainee review panels may use evidence obtained by torture

World Food/Slow Food
Globalization of Food and Agriculture
NAIS? Ridiculous.
The Effects of Globalization on Developing World Agricultural Systems
Jalapenos and Salmonella - Same Old Story?
Industrial Agriculture and Vertical Integration
London Restaurants

Recent Comments:
Greek Orthodox Church In Trouble?
North Carolina Smoking Ban - 1 Day In
Blogathon Post 1 - Globalization and Agriculture
Bush Calls For ANWR Drilling Again
Joe The Unbeliever - My Response to Crucial's Video About Me
george-at-dirtygreek.org george-at-dirtygreek.org



Twitter / DirtyGreek
Follow DirtyGreek on Twitter

My Flickr Photos
Syndicate Me!
Dirty Greek - BatteryFace- Start/Stop Apps On Laptop Power On/Off
  Coding : BatteryFace- Start/Stop Apps On Laptop Power On/Off
You are NOT on the DirtyGreek.Org homepage. Please CLICK HERE to go there.

I wanted to be able to preserve power by killing / starting processes depending on whether my laptop is plugged in or not. It doesn't seem like that would be difficult to find, but I can't find it. So, I took a foray into visual basic and wrote it myself. Well, it's certainly a hack and a half, but I got what I basically want going. It seems pretty functional.

It also utilizes a program called "process" that I got here to terminate processes when you unplug, because I couldn't figure out an easy way to make vb do that. If anyone's an expert on that or finding out if a process is already running to see if it needs to be restarted (right now it just starts applications when you plug in whether they're already running or not), hit me up.

Anyway, if you want to check it out, here you go.

Just unzip all of those files into one place, put the programs you want to start on plug in into startprograms.txt, the process names you want to end when you unplug in endprograms.txt, the names of the services you want to start when you plug in into startservices.txt, and the names of the services you want to stop when you unplug into stopservices.txt, then run BatteryFace.exe and/or have windows start it up automatically.

Oh, and feedback is appreciated, but I don't need you to tell me it's a hack. I would love suggestions on the above mentioned points or any kind of cool ideas for features.

UPDATE: I've added a few features, including some little system tray options to disable and exit, and the ability to start and stop windows services as well as programs.

UPDATE 7/19/2007: I've added more new features, such as the ability to disable during certain times of the day. Also made some visual tweaks.

UPDATE 2/9/2008: I've fixed some problems that basically made this software unusable unless you installed it exactly the way I did. I didn't test well last time... I've also added the ability to add and remove programs and services from the app itself and set the power check cycle time, so that you can tell it not to shut down and restart software if you're just, for example, moving the laptop to another room.

You can also now add and remove programs and services from within the program, by manually entering or choosing them from lists. Also made some more visual tweaks, such as moving the status information to a separate location and making it accessible with a link at the bottom.

Important: Remember to put "quotes" around any file paths or service names that have spaces.


Posted By George on 07/16/2007 @ 10:01 AM | Link and Discuss (0) | More Coding software hacking visualbasic vb programming windows laptop power batteryapp batteryface battery
Share And Enjoy: Post To Del.icio.us Post To Socialposter.com Post To Digg Post To Reddit Post To Technorati Post To Blinklist Post To Stumbleupon Post To Twitter Post To Google Bookmarks Post To NewsVine Post To Microsoft Live Email To A Friend

My Related Posts: Interesting experiments on our selective vision // Why I don't think we've been visited by aliens // Ralph's Response // Ahmed Chalabi - no longer U.S. lackey // More Spying Allegations: Hans Blix //
No Comments
Name
Email
Subject
  Security Image
 
Comment