Dpg Posted February 20, 2014 Share Posted February 20, 2014 Hi all. Little backround info on why i try this. We have an issue here with a mail notifier and the standard idletime from windows. When we get a popup on the notifier the idletimer resets and the screensaver/lockscreen wont kick in after 10 minutes.(microsoft is looking into this for a few months now.) So i made a little script that runs on the timer in autoit. Works great, also added an tool to get the screen to go black. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=lock-6.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Timers.au3> #NoTrayIcon Global $iLimit = 600; idle limit in seconds HotKeySet("+!{ESC}", "_Quit") ;Shift-Alt-Esc AdlibRegister("_CheckIdleTime", 500) While 1 Sleep(20) WEnd Func _CheckIdleTime() If _Timer_GetIdleTime() > $iLimit * 1000 Then DllCall('user32.dll', 'int', 'LockWorkStation') Run("C:\windows\nircmd.exe cmdwait 10 monitor off") EndIf EndFunc ;==>_CheckIdleTime. Func _Quit() Exit EndFunc ;==>_Quit So far so good. Now we want to go from monitor off to an screensaver we build. An .scr file that counts the time someone left the workspace. When i run that after the DllCall('user32.dll', 'int', 'LockWorkStation') then the lockscreen comes and the screensaver runs behind the lockscreen. How can i put it on top of the lockscreen and still use the timer i use in the script? Hope someone can help. Link to comment Share on other sites More sharing options...
CiVQ Posted February 23, 2014 Share Posted February 23, 2014 (edited) Try Yashied's solution: BR. CiV. Edited February 23, 2014 by CiVQ I know that my code is ugly. But it works. Mostly. Link to comment Share on other sites More sharing options...
Dpg Posted February 24, 2014 Author Share Posted February 24, 2014 Thx for the tip. It gave me an idea to solve my problem Link to comment Share on other sites More sharing options...
CiVQ Posted March 1, 2014 Share Posted March 1, 2014 You're welcome I know that my code is ugly. But it works. Mostly. 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