Hello,

I am new to the community (well my first thread anyway). I was just wondering which programming language would be the most effective to run a light weight process watcher, and when it detects a particular process to start a another wait loop, which, when the process ends it will force the computer to sleep. (Another requirement is to do this again upon waking up)

So the general layout of the process:

wait(){
[INDENT]if(ProcessName is running){
[INDENT]wait(){
[INDENT]if(Processname is no longer running){
Tell Computer to sleep
break to the outside wait loop
}[/INDENT]
}[/INDENT]
}[/INDENT]
}

Any help would be greatly appreciated.

Assuming that this isn't just an academic question and that you want to do it yourself, then the best answer is to use something that you are comfortable with. If you want it to be lightweight and you are already into C or C++ then they can do it. It is unlikely that you will learn a new language just to code this module. If I had to do it, I would probably use something that isn't so lightweight because that is what I am familiar with and because I don't think that lightweight is all that important anymore given todays processors and larger memory under 64 bit systems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.