Add function called PixelGetRegionValue

Propose new features and changes
Cooker2007
Posts: 1
Joined: 07 Jun 2021, 01:45

Add function called PixelGetRegionValue

Post by Cooker2007 » 07 Jun 2021, 02:40

Can a function be added to find an arbitrary value for a region of pixels. This would be simple way to determine if a region on the screen has changed instead of manually looping PixelGetColor in a script. Here is code I made by looking through the the source that is mostly? correct.

Code: Select all

script2.cpp

ResultType Line::PixelSearch(...
...
if (aIsPixelGetColor)
{...
}
else if (aIsPixelGetRegionValue)
{
    long temp = 0
    for (; i < screen_pixel_count; ++i)
        temp = temp + screen_pixel[i]; //Need work here
    TCHAR buf[32];
    _stprintf(buf, _T("%u"), temp);
    output_var_x->Assign(buf); // Caller has ensured that first output_var (x) won't be NULL in this mode.
	found = true; // ErrorLevel will be set to 0 further below.
}
This function would be a big help because I currently have to wait five seconds between each loop of my script to make sure the next image is loaded.

User avatar
boiler
Posts: 16900
Joined: 21 Dec 2014, 02:44

Re: Add function called PixelGetRegionValue

Post by boiler » 08 Jun 2021, 14:12

The RegionGetColor function may already do exactly what you’re looking for.

Post Reply

Return to “Wish List”