laurin1 Posted November 6, 2007 Share Posted November 6, 2007 Is it possible to do this? I'd like a script to do something once Windows is goes from "idle" to active. Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com Link to comment Share on other sites More sharing options...
mbkowns Posted November 6, 2007 Share Posted November 6, 2007 Is it possible to do this? I'd like a script to do something once Windows is goes from "idle" to active.Make it detect if the screensaver is active. I am sure there is a way to run a program when screensaver is active. Link to comment Share on other sites More sharing options...
laurin1 Posted November 6, 2007 Author Share Posted November 6, 2007 Make it detect if the screensaver is active. I am sure there is a way to run a program when screensaver is active.Good idea. I bet I can do that. Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com Link to comment Share on other sites More sharing options...
tannerli Posted November 6, 2007 Share Posted November 6, 2007 The screensaver is always a process name <somthing>.scr --> So if you know which screesaver is enabled you just have to look for this process The current enabled screensaver can be looked up under HKCU\Control Panel\Desktop\SCRNSAVE.EXE in the registry ProcessWait("logon.scr") ;Pauses script execution until a given process exists. Link to comment Share on other sites More sharing options...
AcidCorps Posted November 13, 2007 Share Posted November 13, 2007 What if the user dosen't use a screen saver though? Link to comment Share on other sites More sharing options...
weaponx Posted November 13, 2007 Share Posted November 13, 2007 (edited) Just check the cpu usage of System Idle Process, If it is above 90% the system is probably idle.I use Psalty's ProcessListProperties UDF to do this:http://www.autoitscript.com/forum/index.ph...mp;#entry409276 Edited November 13, 2007 by weaponx Link to comment Share on other sites More sharing options...
laurin1 Posted November 13, 2007 Author Share Posted November 13, 2007 Just check the cpu usage of System Idle Process, If it is above 90% the system is probably idle.I use Psalty's ProcessListProperties UDF to do this:http://www.autoitscript.com/forum/index.ph...mp;#entry409276Ok, but that won't work for this purpose, because I have processes running at times that will push the idle below 90%. How does MS do it? Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com Link to comment Share on other sites More sharing options...
weaponx Posted November 13, 2007 Share Posted November 13, 2007 If you have processes taking more than 10% cpu then how is it idle? Link to comment Share on other sites More sharing options...
laurin1 Posted November 13, 2007 Author Share Posted November 13, 2007 If you have processes taking more than 10% cpu then how is it idle?I mean idle in the sense that a user is not on it. My screen saver doesn't stop working because these processes start. It only stops when the keyboard or mouse are used. Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com Link to comment Share on other sites More sharing options...
weaponx Posted November 13, 2007 Share Posted November 13, 2007 Okay now we are clear. You need to know when the user is inactive, well you're in luck because there was a post very recently about this.http://www.autoitscript.com/forum/index.php?showtopic=57038 Link to comment Share on other sites More sharing options...
laurin1 Posted November 13, 2007 Author Share Posted November 13, 2007 Ah, sweet. Thanks. Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now