Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5505 > unrolled thread

Re: turn monitor off and on

Started by"Gabriel Genellina" <gagsl-py2@yahoo.com.ar>
First post2011-05-16 06:29 -0300
Last post2011-05-16 06:29 -0300
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: turn monitor off and on "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> - 2011-05-16 06:29 -0300

#5505 — Re: turn monitor off and on

From"Gabriel Genellina" <gagsl-py2@yahoo.com.ar>
Date2011-05-16 06:29 -0300
SubjectRe: turn monitor off and on
Message-ID<mailman.1637.1305538167.9059.python-list@python.org>
En Sat, 14 May 2011 03:08:44 -0300, Astan Chee <astan.chee@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web