turn monitor off and on
harrismh777
harrismh777 at charter.net
Sat May 14 03:13:57 EDT 2011
Astan Chee wrote:
> import time
> import win32gui
> import win32con
> import win32api
>
> def turnOffMonitor():
> SC_MONITORPOWER = 0xF170
> win32gui.SendMessage(win32con.HWND_BROADCAST,
> win32con.WM_SYSCOMMAND, SC_MONITORPOWER, 2)
>
> def turnOnMonitor():
> SC_MONITORPOWER = 0xF170
> win32gui.SendMessage(win32con.HWND_BROADCAST,
> win32con.WM_SYSCOMMAND, SC_MONITORPOWER, -1)
>
> if __name__ == "__main__":
> turnOffMonitor()
> time.sleep(5)
> turnOnMonitor()
What we need here is a matching script that turns off WinXP and leaves
it off too...
... ouch, <sorry, couldn't help myself> :)
lol
m harris
More information about the Python-list
mailing list