Jump to content

Finding A Picture


dapapa
 Share

Recommended Posts

I do not have an extremely good understanding of what is possible with the pixel functions, but I have a basic understand.

Is it possible, using only autoit, to search for a picture on the screen?

Lets say I take a picture of a program.(screenshot)

Then I cut out a certain part of it with paint.

I then save that cropped picture to the script directory.

Would it be possible to search the screen after a certain window has appeared, and look for the picture? If and when the picture is found, do a certain function?

If not... How could this be done with autoit?

Link to comment
Share on other sites

A pixel is only a TINY DOT that defines a picture.

SO you could search for a unique dot that a picture has, OR, search for a unique dot with certain other dots around it. Like search for 0x000000 and look for 0x000001 right next to it.

Do you need code as an example?

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

I know that, the code would help, I was just searching for an easier rought, but yes, that would help...

Is there a way to make it search for a certain dot, but that dot must have certain dots within a certain radius of the original dot? And search the entire screen? OR just a certain opened window?

or, is there any programs that will get every pixel in a certain corrdinates?

That way I could make it log the pixels in my picture, then search the screen for all of them? And they must be touching?

Possible...?

Edited by ixparaxi
Link to comment
Share on other sites

Use the AutoIT Window Spy to get pixels.

You'd have to do some very hard (at your level) programming for that. Lots of math and lots of sanity checks, requiring lots of optimization to be useful.

I suggest you start small using:

PixelGetColor

PixelSearch

And read up on your basics with getting the area of circles and such. Learning arrays/loops wouldn't hurt either.

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

...becuase it'd be insanely stressful on the CPU, there's NO reason for it.

You can search for unique pixels.

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

I just told you a couple posts back, in bold.

Please research them.

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

Larry posted a script in Scripts and Scraps some time ago that does something similar to this, if I recall correctly. Search there for threads by him on things like OCR, pixel, match .. stuff like that

HTH

:lmao:

Edit: in fact, he has two versions there. this looks like the latest one..

http://www.autoitscript.com/forum/index.php?showtopic=6465&hl=pixel

Edited by trids
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...