#include <Array.au3>
_ArrayDisplay(XsqInfo(), '显示器信息')
Func XsqInfo()
;调用WMI查看显示器信息。为获得详实信息请确定已安装过显示器驱动。
;(Afan--http://www.autoitx.com/?fromuid=7644923)
Local $xsInfo[19] = [18]
$objWMIService = ObjGet("winmgmts:\\.\root\cimv2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_DesktopMonitor")
For $Info In $colItems
$xsInfo[1] = $Info.Availability
$xsInfo[2] = $Info.Caption
$xsInfo[3] = $Info.ConfigManagerErrorCode
$xsInfo[4] = $Info.ConfigManagerUserConfig
$xsInfo[5] = $Info.CreationClassName
$xsInfo[6] = $Info.Description
$xsInfo[7] = $Info.DeviceID
$xsInfo[8] = $Info.MonitorManufacturer
$xsInfo[9] = $Info.MonitorType
$xsInfo[10] = $Info.Name
$xsInfo[11] = $Info.PixelsPerXLogicalInch
$xsInfo[12] = $Info.PixelsPerYLogicalInch
$xsInfo[13] = $Info.PNPDeviceID
$xsInfo[14] = $Info.ScreenHeight
$xsInfo[15] = $Info.ScreenWidth
$xsInfo[16] = $Info.Status
$xsInfo[17] = $Info.SystemCreationClassName
$xsInfo[18] = $Info.SystemName
Return $xsInfo
Next
EndFunc ;==>XsqInfo
没弄过WMI,今天现买现卖的... |