Advertisement
Guest User

Untitled

a guest
Oct 15th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.36 KB | None | 0 0
  1. Global Const $WM_SYSCommand = 274, $SC_MonitorPower = 61808, $Power_On = -1, $Power_Off = 2, $HWND = WinGetHandle(WinGetTitle("", ""))
  2. HotKeySet('!{F6}','_MonitorOff')
  3. While 1
  4.     Sleep(1000)
  5. WEnd
  6. Func _MonitorOff()
  7.     DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off)
  8. EndFunc   ;==>_MonitorOn
  9.  
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement