Sign in to follow this  
Followers 0
JuggaloZeke

Making PixelSearch keep going?

6 posts in this topic

I'm trying to figure out a way to use the PixelSearch function to crawl over an image and record every pixel that is a certain color. I would like it to also log every pixel coord that matches the criteria.

I just cannot figure out how to get the function to "continue" searching after it has found its first result.

The ultimate point of this tool would be to then load the coord log into another script which would then trace out the image that was recorded pixel by pixel.

Share this post


Link to post
Share on other sites



I'm trying to figure out a way to use the PixelSearch function to crawl over an image and record every pixel that is a certain color. I would like it to also log every pixel coord that matches the criteria.

I just cannot figure out how to get the function to "continue" searching after it has found its first result.

The ultimate point of this tool would be to then load the coord log into another script which would then trace out the image that was recorded pixel by pixel.

Hi dude,

Im also stuck with this problem. But, I also have this question.

How do u determine the pixel color of a certain point? Just want to ensure at that certain co-ordinate, wish to compare and ensure it is the desired color. Is that possible? Preferbly in hexadecimal or binary form.

Thanks

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi. i hope you talk about this autoit extra window it can be found in folder where you instaled it, and should look like this Posted Image , if not sorry

Edited by lolifox

Share this post


Link to post
Share on other sites

Hi dude,

Im also stuck with this problem. But, I also have this question.

How do u determine the pixel color of a certain point? Just want to ensure at that certain co-ordinate, wish to compare and ensure it is the desired color. Is that possible? Preferbly in hexadecimal or binary form.

Thanks

PixelGetColor would get the color of a specific coord and return the value as a decimal. This could then be compared to your desired color.

Now, anyone have any help for the original post?

Share this post


Link to post
Share on other sites

Sorry for bumping an old topic but I've also ran into this issue, any ideas anyone?

Share this post


Link to post
Share on other sites

i would try this:

Dim $color,$startx,$starty,$neededcolor,$CoordinateArray[0][2]

for i=0 to $yend step 1
for j=0 to $xend step 1
$color=Pixelgetcolor($startx+$i,$starty+$j)
if $color=$neededcolor Then
Redim $CoordinateArray[Ubound($CoordinateArray)+1]
$CoordinateArray[Ubound($CoordinateArray)][0]=$startx+$i
$CoordinateArray[Ubound($CoordinateArray)][1]=$starty+$j
Endif
Next
Next

it probably wont work immediatly but this would be something to start with.

i didnt test the code so look out for errors. If you get errors en dont understand them ask for help.

Share this post


Link to post
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
Sign in to follow this  
Followers 0