Jump to content

Screen Timeout Countermeasure


dufran3
 Share

Recommended Posts

Asked by my coworkers to create a script that will prevent the computer for locking after 15 min. of inactivity. Dang IS department locked computers down and won't allow us to change the setting, or increase the idle time. Anyway... hope this is useful for others.

; #INDEX# =======================================================================================================================
; Title .........: Screen Timeout Countermeasure
; AutoIt Version : 3.3.6.1
; Language ......: English
; Description ...: Designed to keep computer awake against a 15 minute lock screen setting
; Author(s) .....: Dufran3 kind of, Melba23 helped me revise my initial sloppyness!
; ===============================================================================================================================
#include <Timers.au3>

HotKeySet("{ESC}", "On_Exit")

AdlibRegister("_MoveMouse", 20000) 

Global $fToggle = True

While 1
    Sleep(10)
WEnd

Func _MoveMouse()
    If _Timer_GetIdleTime() > 870000 Then     ;Change 870000(14.5 min. value if need longer or shorter)
        $fToggle = Not $fToggle
        $aMPos = MouseGetPos()
        MouseMove($aMPos[0] + (2 * $fToggle - 1), $aMpos[1])
        ;ConsoleWrite("Mouse Moved" & @CRLF)
    EndIf
EndFunc

Func On_Exit()
    Exit
EndFunc
Link to comment
Share on other sites

I work in I.T. Department this is often frowned upon. Lockout is there for a reason, what if you step out of your office and disgruntled co-worker get on your computer without your knowledge and sent a threaten email to your employer... just something to think about.

Link to comment
Share on other sites

lol, I worked in IS for a number of years. I know why they do it. Like I said, just helping out some co-workers, not really interested in an ethical evaluation. lol. You think I'm actually using this? Hell no! I lock my computer if I'm not sitting in front of it, for the exact reasons you specified.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...