﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3977	Return problem by PixelSearch/PixelGetColor	anonymous		"I've found a problem where I don't think the wrong coordinates are coming from the pixel color functions.

I look for a red pixel on the screen and then move the mouse there. Then I make a tooltip with the coordinates and the color code. There is a difference between the two values! That's why I opened the AutoIt Windows information window. The pixels specified in the tooltip match, but the color codes do not. The red pixel you are looking for is not under the mouse cursor. Therefore there seems to be an error when returning the PixelSearch/PixelGetColor object.


{{{
#include <MsgBoxConstants.au3>
AutoItSetOption ( ""PixelCoordMode"" ,1)
AutoItSetOption ( ""MouseCoordMode"" ,1)

; Find a pure red pixel in the range 0,0, 1450,770
Local $aCoord = PixelSearch(0, 0, 1450, 770, 0xFF0000)
If Not @error Then
	MouseMove($aCoord[0],$aCoord[1])
	ToolTip(""X and Y are: "" & $aCoord[0] & "","" & $aCoord[1], 0, 0)
EndIf
Sleep(1000)

;Check result again
Local $aCoord = MouseGetPos()
$color = PixelGetColor($aCoord[0],$aCoord[1],1) 

$sString = Hex($color,6) ; Convert the hex string back to the original string.
ToolTip(""X and Y are: "" & $aCoord[0] & "","" & $aCoord[1] & "" with color: #"" & $sString, $aCoord[0]+10,$aCoord[1]+10)
Sleep(500)
}}}
"	Bug	closed		AutoIt	3.3.16.1	None	No Bug		
