Disable mandatory screen saver

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
So you're trying to watch a movie on your shiny new corporate laptop. Ten minutes into the film, the automatic screen saver kicks in, locks the machine and forces you to re-login. The little weasels at IT have even disabled the screen saver properties, so you can't even turn it off. That is, until...

Here's a tiny python script that will fake keyboard activity every five minutes in order to prevent a screen saver from activating.

"""Fake keyboard activity to prevent screen saver from activating."""
import win32api
import win32con
import time
while True:
print "Faking keyboard activity at", time.asctime()
win32api.keybd_event(win32con.VK_SHIFT, 0, 0, 0)
win32api.keybd_event(win32con.VK_SHIFT, 0, win32con.KEYEVENTF_KEYUP, 0)
time.sleep(60 * 5)

or download these


http://kempele.fi/~skyostil/etc/disable-screensaver.c

Windows
http://kempele.fi/~skyostil/etc/disable-screensaver.exe

Python
http://kempele.fi/~skyostil/etc/disable-screensaver.py
 
Status
Not open for further replies.
Back
Top Bottom