我尝试获取当前监视器状态并在http://msdn.microsoft.com/en-us/library/windows/desktop/dd144901(v=vs.85).aspx找到 GetMonitorInfo 函数,但我不知道c++以及如何在autohotkey中使用它。DllCall 行只是一个猜测,所以这就是我现在写的。
MonitorStatus := 1 > 2 ; Creates a boolean variable so size of it is determined.
Sleep 1000
DllCall("GetMonitorInfo","HMONITOR",1,"LPMONITORINFO",MonitorStatus,"int")
Sleep 1000
MsgBox Monitor status is %MonitorStatus%. ; Status should be turned to 1.
Return
很快如何在假设它有电的情况下检测显示器是打开还是关闭?