What are we left with? A nation of god-fearing, pregnant nationalists who feel it's their duty to populate the homeland; pass on traditions; how to get ahead - religions - the idiots are taking over.
- NOFX
::   Blog  ::   Photos  ::   Europe  ::   Books  ::   Articles  ::   Links  ::   Friends  ::   Combo Feed  ::   Mobile  ::    
Need Help?

Powered by FeedBlitz
Feed: RSS Feed: http://www.dirtygreek.org/dirtygreek.rss

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

Twitter

@dirtygreek


george-at-dirtygreek.org george-at-dirtygreek.org


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
Previous: I Haven't Been 'Political' In A While - 07/13/2007 @ 01:27 AM
Next: DirtyGreek.Org Del.icio.us Links - 07/26/2007 @ 11:25 AM

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.


Link or Discuss | By George on 07/16/2007 @ 10:01 AM | Share And Enjoy: Post To Twitter Post To Del.icio.us Post To Digg Email To A Friend

Tags:
My Related Posts: Ibogaine - Addiction Cure? // Industrial Agriculture and Vertical Integration // The Salvador Option // On The Murder of Dr. Tiller and Home-Grown Christian Jihadists // MoveOn.Org "Geek Organizer" //