screensaver
Thomas Heller
theller at python.net
Wed Nov 12 03:32:58 EST 2003
mis6 at pitt.edu (Michele Simionato) writes:
> I would like to disable/enable the screensaver on a Win98 box with a
> Python script. Any suggestion? Thanks,
>
> Michele
A google search for 'disable screensaver windows' turns up VB code,
which easily translates into this Python code:
-----
import ctypes
SPI_SETSCREENSAVEACTIVE = 17
def StartScreenSaver(on):
ctypes.windll.user32.SystemParametersInfoA(
SPI_SETSCREENSAVEACTIVE, on, None, 0)
StartScreenSaver(1)
-----
Unfortunately, it doesn't seem to work (for me, on XP. At least it has
no visible effect).
Thomas
More information about the Python-list
mailing list