Opt('PixelCoordMode', 0)
$Handle=WinGetHandle('目标窗口')
While WinExists($Handle)
If PixelGetColor(1317, 1032, $Handle) = '15772512' And PixelGetColor(1317, 1033, $Handle) = '6291510' And PixelGetColor(1316, 1033, $Handle) = '15790251' And PixelGetColor(1318, 1038, $Handle) = '11268336' And PixelGetColor(1318, 1039, $Handle) = '0' _
And PixelGetColor(1321, 1037, $Handle) = '3573710' And PixelGetColor(1320, 1037, $Handle) = '13535030' And PixelGetColor(1320, 1033, $Handle) = '8861184' And PixelGetColor(1317, 1032, $Handle) = '15772512' Then
$hTimer = TimerInit()
Do
ToolTip('设备无帧率', 0, 0, "错误", 3) ;设备无帧率
Sleep(1000)
ToolTip('')
Sleep(500)
Until Not WinExists($Handle) Or PixelGetColor(1317, 1032, $Handle) <> '15772512' Or PixelGetColor(1317, 1033, $Handle) <> '6291510' Or PixelGetColor(1316, 1033, $Handle) <> '15790251' Or PixelGetColor(1318, 1038, $Handle) <> '11268336' Or PixelGetColor(1318, 1039, $Handle) <> '0' _
Or PixelGetColor(1321, 1037, $Handle) <> '3573710' Or PixelGetColor(1320, 1037, $Handle) <> '13535030' Or PixelGetColor(1320, 1033, $Handle) <> '8861184' Or PixelGetColor(1317, 1032, $Handle) <> '15772512'
IniWrite(@ScriptDir & '\状态日志.log', '设备无帧率', @YEAR & '/' & @MON & '/' & @MDAY & '-' & @HOUR & ':' & @MIN & ':' & @SEC & '(结束时间)', Round(TimerDiff($hTimer) / 1000) & 's(时长)')
EndIf
WEnd
所以想问问A大还有各位大佬 ,PixelGetColor 在相同位置采取的点颜色不一样,是我自己设置的问题,还是哪里出问题了? 我头大了都想不出来 ,万分感谢!