Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to find a way to detect when my computer decides I've been away (no user input) long enough to turn off the display. That also means I'm not watching movies and the OS is not prohibited from turning off the display by any media players.

So far I found out that it may be possible to schedule a task to run if an event occurs, through Task Scheduler, a built-in Windows component. But I couldn't find such an event as turning on (off) the display in system event logs. Is there even such an event to begin with? Maybe I'm not using the correct tools for the job.

Anyway, I'd like to be able to detect when Windows turns the display on and off (two separate events) so that I could run a certain process when these events occur. How do I do that?

Note: I need this to work reliably when the screen is turned on or off by Windows, so any timers and applications "watching" after media players are not the desired solution.

share|improve this question
    
Do you mean automatically? Or with a script that you have to run manually? –  imtheman Aug 9 '13 at 23:30
    
What kind of process is it? Can you give more information? Apart from this, the only thing I would say is that it doesn't seem that the process is working as well as it should. EDIT: Anyway... as stated previously in a (now deleted) post, the Task Scheduler has the ability to run programs and scripts at a certain time. It has actually a lot of functions that might help solve your problem, and if the options don't suffice you could make a script that kills the process. –  Doktoro Reichard Aug 9 '13 at 23:34
    
I'd like the process to be suspended when the OS thinks I'm away without me doing anything, because it's obviously impossible, since I will not be present at the computer at that moment. –  user1306322 Aug 10 '13 at 0:04
    
It's a lighting manager application that can't handle a few things when the computer is in "away" mode. The developers are gone and I'm still trying to enjoy their little piece of software, but apparently it wasn't made for modern OSs. –  user1306322 Aug 10 '13 at 0:09
1  
It has to do with the application that tries to do the amount of work it could during my break, making the PC unresponsive for as long as I was away. I can't debug that, the developers aren't there anymore for that too, so this is an attempt to work around this issue. But did you really need that information to answer my question? –  user1306322 Aug 10 '13 at 1:01
show 4 more comments

1 Answer

Process explorer lets you suspend/resume processes, though naturally, you need to test it in the specific scenario.

Alternately, its a bit of a workaround but you could probably get some bit of software that would emulate mouse jiggles- Mouse Jiggler was suggested here and should do the trick. You might be able to, alternately work out some mechanical way to do so.

share|improve this answer
    
Or I could just disable the "away" mode altogether, but that's not what I am after here. –  user1306322 Aug 10 '13 at 1:04
    
True. Updated my answer with process explorer, which was what I was actually trying to remember ;p –  Journeyman Geek Aug 10 '13 at 1:06
    
I know about Process Explorer and its ability to put processes under suspension, that's how I learned this issue can be countered by suspending the process. –  user1306322 Aug 10 '13 at 1:06
    
superuser.com/questions/426351/… looks like pssuspend method tied to the taskscheduler triggers/events. might pull it off. –  Psycogeek Aug 10 '13 at 2:17
    
I updated my question about 50 minutes ago with results of such attempts. –  user1306322 Aug 10 '13 at 2:36
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.