[英]How to Get Monitor Info with Autohotkey?
我尝试获取当前的监视器状态,并在http://msdn.microsoft.com/zh-cn/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
简短地说,如何在假设显示器已通电的情况下检测显示器是打开还是关闭?
DllCall返回指向该结构的指针。 我认为可以在Autohotkey中使用指针,但是我认为这并不容易。 如果您不知道这意味着什么,就不用担心。
嗯..看起来自动快捷键确实包含了所有内容; 尝试这个:
http://www.autohotkey.com/docs/commands/SysGet.htm
并且不要忘了查看页面底部的示例!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.