M
Michele Simionato
I would like to disable/enable the screensaver on a Win98 box with a
Python script. Any suggestion? Thanks,
Michele
Python script. Any suggestion? Thanks,
Michele
I would like to disable/enable the screensaver on a Win98 box with a
Python script. Any suggestion? Thanks,
Michele
Andy Jewell said:Michele,
there's probably a switch in the registy... check the MS site for details
.
i'm sure you know how to use the winreg module ;-)
good luck
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)
<snip>Michele said:Unfortunately, I am not a Windows person. Actually I mostly use
Windows to
watch DVD's, so I would like to stop the screensaver before watching
the movie and restart it afterward, in an automatic fashion. I looked
Michael Geary said:Thomas Heller:
Your StartScreenSaver() function should probably be called
EnableScreenSaver(). Call it with a 0 parameter to disable the screen saver,
or 1 to enable it.
The function won't have any immediate visible effect--it simply enables or
disables the screen saver, it doesn't start or stop it.
Try setting your screen saver timeout to one minute. Let the computer sit
for a minute to verify that the screen saver is working. Then call
EnableScreenSaver(0) to disable the screen saver, and let the computer sit
for a minute again to see if you've disabled it.
-Mike
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.