The Devil's Work by Wuul

The Devil's Work is a utility that executes a particular program when your PC switches between idle and non-idle. I wrote it because my PC has eMule running constantly, but eMule takes up virtually all of my bandwidth which is frustrating when I am trying to use the web at the same time. Although you can manually adjust eMule's throttling rate, it is irritating to have to remember to set it to low bandwidth when I want to use the PC, and then switch it back to unlimited bandwidth when I have finished using it. I wrote this utility so that whenever my PC is idle for more than 1 minute it will automatically set eMule to use unlimited bandwidth, then if I start using my PC again the program will tell eMule to restrict its bandwidth.

I wrote it specifically for eMule and the configuration file is set up for this, but you could use it to run any particular program. All you need to do is to edit the file "thedevilswork.conf" and edit the following settings:

runOnStartup.program=c:\progra~1\emule\emule.exe
runOnStartup.params=limits=2,6
runOnStartup.workingDir=c:\progra~1\emule

runOnIdle.program=c:\progra~1\emule\emule.exe
runOnIdle.params=limits=0,0
runOnIdle.workingDir=c:\progra~1\emule

runOnActive.program=c:\progra~1\emule\emule.exe
runOnActive.params=limits=2,6
runOnActive.workingDir=c:\progra~1\emule

runOnExit.program=
runOnExit.params=
runOnExit.workingDir=

idleTriggerTime=60000
checkEvery=10000
"runOnStartup" is optional and the utility will run this when it starts. "runOnIdle" runs when your PC has been idle for the amount of time specified by "idleTriggerTime" (milliseconds). "runOnActive" is run when your PC becomes active again, i.e. when you move the mouse or use the keyboard. "runOnExit" is optional and runs when you close the program. The setting "checkEvery" specifies how often the program checks the idle/non-idle state, you probably don't want to change this. Make sure that idleTriggerTime is higher than checkEvery.

Full Delphi source code is provided.

Trivia: The name of the program comes from the old saying "The Devil makes work for idle hands".


Download The Devil's Work and source

View screenshot


If you have any questions or want to report a bug please drop me a line at

Sorry, but a Javascript-enabled browser is required to email me.


As I don't get a lot of time to respond to emails, I have created a forum where you can discuss this software with other users. Feel free to post bug fixes, suggestions for improvements, questions or anything else related to this software. The forum link is http://wuulsoftware.freeforums.org/
To build the software you will need these additional components

Home