Opt("PixelCoordMode", 2) ;1=абсолютные, 0=относительные, 2=клиентские
$hWnd = WinGetHandle('XnView')
$aSize = WinGetClientSize($hWnd)
For $y = 1 To $aSize[1]
For $x = 1 To $aSize[0]
$color = PixelSearch($x, $y, $aSize[0], $y, 0x000000, 0, 1, $hWnd)
if not @error Then
if PixelGetColor($color[0]+1, $color[1], $hWnd) = 0xffffff Then
MsgBox (0, '', $color[0] & ',' & $color[1])
Exit
Else
If $x >= $aSize[0] Then
ExitLoop
Else
$x = $color[0] + 1
EndIf
EndIf
EndIf
Next
Next