26.通过WMI获取屏幕高度与宽度
定义:让猴子任意点击界面的测试,先获取屏幕的高度与宽度
脚本:
Computer="."
Set objWMIService=GetObject("winmgmts:\\"& Computer &"\root\CIMV2")
Set colItems=objWMIService.execquery("select * from win32_desktopMonitor",,48)
For Each objitem In colitems
height=objitem.screenheight
width=objitem.screenwidth
Next
MsgBox width & "," & height