用于检索屏幕分辨率和多显示器信息的函数. 点击函数名获取详细信息.
| 函数 | 描述 |
|---|---|
| MonitorGet | 检查指定的监视器是否存在, 并可选地检索其边界坐标. |
| MonitorGetCount | 返回监视器的数量. |
| MonitorGetName | 返回指定监视器的操作系统名称. . |
| MonitorGetPrimary | 返回主监视器的编号. |
| MonitorGetWorkArea | 检查指定的监视器是否存在, 并可选地检索其工作区域的边界坐标. |
内置变量 A_ScreenWidth 和 A_ScreenHeight 包含主监视器的尺寸(以像素为单位).
可以使用 SysGet 检索所有显示监视器的边框. 例如, 它检索虚拟屏幕的宽度和高度:
MsgBox SysGet(78) " x " SysGet(79)
MonitorCount := MonitorGetCount()
MonitorPrimary := MonitorGetPrimary()
MsgBox "Monitor Count:`t" MonitorCount "`nPrimary Monitor:`t" MonitorPrimary
Loop MonitorCount
{
MonitorGet A_Index, &L, &T, &R, &B
MonitorGetWorkArea A_Index, &WL, &WT, &WR, &WB
MsgBox
(
"Monitor:`t#" A_Index "
Name:`t" MonitorGetName(A_Index) "
Left:`t" L " (" WL " work)
Top:`t" T " (" WT " work)
Right:`t" R " (" WR " work)
Bottom:`t" B " (" WB " work)"
)
}