Jump to content

Difference between pixelsearch & pixelchecksum, I have read the help file.


nyxx24
 Share

Recommended Posts

Hello All,

As the title states I am asking someone to help explain further the difference between pixelsearch & pixelchecksum, and yes I have read the help file previously.

I have seen both used to check a single point on the screen for a pixel of a certain color or shade variation and succed

In that application which is better or more eficient, what is the fundemental difference between the two.

Thank you for taking time to read my post, and hopefully reply.

Nyxx

Link to comment
Share on other sites

It's like the helpfile says:

PixelChecksum= Generates a checksum for a region of pixels.

PixelSearch= Searches a rectangle of pixels for the pixel color provided.

Link to comment
Share on other sites

Pixelchecksum looks inside the coords you give see if there is a change(you dont specify the color).

pixelsearch searches for a certain color within the coords you give it - or the whole screen

they can do the same thing but one might be better then the other depending on the situation

- if in a video game and you dont know where something will pop up on the screen pixelsearch would be better

- but if you know that something will pop up and the color isnt always constant then you could use pixelchecksum

Edited by Rental
Link to comment
Share on other sites

It's like the helpfile says:

PixelChecksum= Generates a checksum for a region of pixels.

PixelSearch= Searches a rectangle of pixels for the pixel color provided.

PixelSearch= Searches a rectangle of pixels for the pixel color provided:

Ok I get this part, and it surches by the hex value within whatever range provided

PixelChecksum= Generates a checksum for a region of pixels.

I am still not following this, what is the definition of a "region" of pixels and what is the checksum is it an average of all color values in that area?

Link to comment
Share on other sites

Pixelchecksum looks inside the coords you give see if there is a change(you dont specify the color).

pixelsearch searches for a certain color within the coords you give it - or the whole screen

they can do the same thing but one might be better then the other depending on the situation

- if in a video game and you dont know where something will pop up on the screen pixelsearch would be better

- but if you know that something will pop up and the color isnt always constant then you could use pixelchecksum

"and the color isnt always constant" I would think in the application of a video game the colors are never constant, so then that might not be the better use...

So if for example the person using the feature wants to enact a change if the color at a certain location of about 6 pixels square became constantly white, when it would otherwise be everchanging to anything but white then by your answer pixel search is better?

but

If for example the person using the feature wants to enact a change if the color at a certain location of about 6 pixels which is constantly white, changed to anything but white then by your answer pixel checksum is better?

Sorry if I am being a bother I am just trying to better learn what they do than just applying something that works without really knowing how.

Nyxx

Link to comment
Share on other sites

the region is the coords you set(left, top, right, bottom) which form the shape(normally a square) that it looks into for the pixels.

for checksum it checks all the pixels in the region and feeds back one hex

to answer you examples:

1: if you have a 6x6 square that changed color constantly, and you want to detect if the color was white then you would used pixelsearch, this one you can specify the color you want.

2: if you had another 6x6 square that was always red and once in a while something would pop up in that 6x6 square but you dont know the color that will pop up in there, then pixelchecksum would be better because you dont know the color that pops up

** there is other ways to do that 2nd one by using pixelgetcolor() but i wont get into that. that just adds more confusion

Edited by Rental
Link to comment
Share on other sites

the region is the coords you set(left, top, right, bottom) which form the shape(normally a square) that it looks into for the pixels.

for checksum it checks all the pixels in the region and feeds back one hex

to answer you examples:

1: if you have a 6x6 square that changed color constantly, and you want to detect if the color was white then you would used pixelsearch, this one you can specify the color you want.

2: if you had another 6x6 square that was always red and once in a while something would pop up in that 6x6 square but you dont know the color that will pop up in there, then pixelchecksum would be better because you dont know the color that pops up

** there is other ways to do that 2nd one by using pixelgetcolor() but i wont get into that. that just adds more confusion

Excellent you have been quite helpful thank you! Might I be able to ask you some other questions about other features that I might like to have a better understanding of..? :)

Link to comment
Share on other sites

your always welcome to, but right now I am heading to bed, either PM me about any questions you have(I normally check them when i wake up) or make another thread about them and if no1 has answered you by the time I get on i'll try to answer them

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...