Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'terry': 0.07; 'python': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'api': 0.11; 'monitor': 0.12; 'def': 0.13; 'am,': 0.14; 'wrote:': 0.14; "'no": 0.16; '-1)': 0.16; 'power.': 0.16; 'reedy': 0.16; 'question.': 0.18; 'work,': 0.20; 'jan': 0.22; 'header:In-Reply-To:1': 0.22; '(and': 0.22; 'parameters': 0.26; 'windows': 0.26; 'tried': 0.27; 'does': 0.31; 'to:addr:python-list': 0.32; 'source': 0.32; 'screen': 0.32; "i've": 0.33; 'bit': 0.33; 'reference': 0.34; 'using': 0.34; 'header:X-Complaints-To:1': 0.34; 'that,': 0.35; 'header:User-Agent:1': 0.35; 'list.': 0.35; 'should': 0.37; 'less': 0.38; 'received:org': 0.38; 'signal': 0.39; 'to:addr:python.org': 0.39; 'header:Mime-Version:1': 0.39; 'black': 0.40; 'header:Received:5': 0.40; 'might': 0.40; 'card': 0.63; 'graphics': 0.63; 'awaiting': 0.73; 'subject:off': 0.73 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: turn monitor off and on Date: Sat, 14 May 2011 15:58:28 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305403126 news.xs4all.nl 81476 [::ffff:82.94.164.166]:57376 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5382 On 5/14/2011 3:20 AM, harrismh777 wrote: > harrismh777 wrote: >> >> def turnOnMonitor(): >> SC_MONITORPOWER = 0xF170 >> win32gui.SendMessage(win32con.HWND_BROADCAST, >> win32con.WM_SYSCOMMAND, SC_MONITORPOWER, -1) > > > I've never tried turning my monitor on/off without using my finger... The computer cannot turn off the monitor. It can only tell the graphics card to turnoff the signal to the monitor. My monitor then displays 'No signal detected' in a box and puts itself into a low-power state awaiting a signal. Even if the monitor does not do that, a black screen should use less power. Why the turnon does not work, if indeed it does not (and the monitor is not failing to respond to its resumption) is not a Python question. 2 and -1 as off and on parameters is a bit strange. The OP might try a different api reference source or ask on a windows innards list. -- Terry Jan Reedy