Modify

Opened 10 years ago

Closed 6 years ago

#3127 closed Bug (Fixed)

PixelGetColor ignore third HWND parameter

Reported by: petrsum@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description

The PixelGetColor function with passed HWND parameter should analyze a DC of the specified window. Now it still analyze a entire screen DC instead.

Probably, the issue is passing NULL to GetDC function always. As I understand the GetDC function call is a part of the PixelGetColor implementation.

This is a log of WinAPI functions that have been called by PixelGetColor function work in an attachment.

Attachments (1)

api-get-pixel.png (73.7 KB ) - added by petrsum@… 10 years ago.
Screen-shoot of the PixelGetColor function call

Download all attachments as: .zip

Change History (5)

by petrsum@…, 10 years ago

Attachment: api-get-pixel.png added

Screen-shoot of the PixelGetColor function call

comment:1 by anonymous, 10 years ago

Perhaps, this bug causes a strange behavior of the PixelCoordMode option switching. Now it seems that the default (absolute screen coordinates) mode is used always.

comment:2 by anonymous, 10 years ago

HWND used only if "PixelCoordMode" 0 or 2. If 1 then HWND is ignored. So it was always.

comment:3 by petrsum@…, 10 years ago

I have checked a behavior with "PixelCoordMode" option equal to 2. GetDC WinAPI function that is called before GetPixel still receive a NULL as input parameter.

It is strange why processing of the HWND parameter should be tied with "PixelCoordMode" option. Expected result of the passing HWND parameter is possibility of getting a pixel color from an overlapped window.

comment:4 by J-Paul Mesnage, 6 years ago

Resolution: Fixed
Status: newclosed

Yes it is strange but as changing the behavior will be a SCRIPT BREAKINg only doc was change

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.