如何实现关闭显示器
如何实现关闭显示器高手们!!!:face (36): 拔电源:face (22): 按開關! POWER ... XD 搜索啊
http://www.autoitx.com/forum.php?mod=viewthread&tid=12683 #include <SendMessage.au3>
_Main()
Func _Main()
Local Const $Off = 2, $On = -1
Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_ToggleMonitor($hWnd, $Off)
Sleep ( 3000 )
_ToggleMonitor($hWnd, $On)
EndFunc
Func _ToggleMonitor($hwnd, $OnOff)
Local Const $WM_SYSCOMMAND = 274
Local Const $SC_MONITORPOWER = 61808
_SendMessage($hWnd, $WM_SYSCOMMAND, $SC_MONITORPOWER, $OnOff)
If @error Then
MsgBox(0,"_ToggleMonitor", "_SendMessage Error: " & @error)
Exit
EndIf
EndFunc 谢谢分享!! 呵呵,温习一遍,至少三种方法哦 拔电源最实际
页:
[1]