En Sat, 14 May 2011 03:08:44 -0300, Astan Chee <astan.c...@gmail.com> escribió:

I'm trying to turn off my monitor, pause and then turn it on again.
I'm doing this in python 2.6 and windows xp. Here is my script so far
(that doesn't work):

def turnOnMonitor():
  SC_MONITORPOWER = 0xF170
  win32gui.SendMessage(win32con.HWND_BROADCAST,
win32con.WM_SYSCOMMAND, SC_MONITORPOWER, -1)

For some reason, the script doesn't turn the monitor back on. What am
I doing wrong here or are there any other alternative?

Your script worked fine for me, 2.6 and XP also. Perhaps your monitor device driver is buggy or does not implement the required functionality. Mine is from Philips.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to