Jump to content

How to compar pixels?


lolp1
 Share

Recommended Posts

That function will only tell me if something has changed...

A checksum only allows you to see if "something" has changed in a region - it does not tell you exactly what has changed.

I am trying to compare, not check if something has chaned.

Link to comment
Share on other sites

  • Moderators

That function will only tell me if something has changed...

I am trying to compare, not check if something has chaned.

So you're going to tell me what the function does now?

It returns a value (the sum of the pixels in that area). So...

$Pic1 = PixelCheckSum(area)
If PixelCheckSum(area) = $Pic1 Then MsgBox(64, 'Info', 'Duh!')

Edit:

After reading PixelCheckSum's information, I have to say that it could use a tad better description and or explination. Although to me 2+2 = 4 most of the time Pixel + Check + Sum :)

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Pixel reference I guess you could call it. I am wondering if it is possible to check the screen for an 'alike' pixel of something.

EG:

You have a Screen shot of a penny, and in a web page there is that exzact same picture of that pennt, is there a way to use the picture of a penny as a reference to search for the penny on the screen?

Link to comment
Share on other sites

  • Moderators

Pixel reference I guess you could call it. I am wondering if it is possible to check the screen for an 'alike' pixel of something.

EG:

You have a Screen shot of a penny, and in a web page there is that exzact same picture of that pennt, is there a way to use the picture of a penny as a reference to search for the penny on the screen?

http://www.autoitscript.com/forum/index.ph...st&p=134394

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Actualy, now that I take a further look into this, this is nto what I am looking for.

Like I said I want to compare pixels, not find a certian indivual color.

1. Read the scripts.

2. What do they do "Exactly"?

3. Yes, it's EXACTLY what you asked for.

Difference, it finds a unique color 1st, so the pictures are easier identified!

If a script isn't 100% what you're looking for, then edit out or add to it to make it what you need.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Here is a better explination of what I am talking about:

It already knows what the pic looks like:

Posted Image

It goes to a web page and does a scan for an alike pic, and if one is found you can them perform what ever action you decide... is that possible in auto-it?

Link to comment
Share on other sites

  • Moderators

Here is a better explination of what I am talking about:

It already knows what the pic looks like:

Posted Image

It goes to a web page and does a scan for an alike pic, and if one is found you can them perform what ever action you decide... is that possible in auto-it?

Ok, I'm past the frustration point now I think.... I gave a solid answer... You've just put no effort in figuring it out.

BTW... _IEImgGetCollection() wouldn't work?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

You've practicly ignored every post I made.

My examples are clear, and I've spent 3 hours searching, and found nothing. So I posted here.

It is not for a web page, i'm just using that as an example.

Imagine there a picture of a sword on a video game. Is there a way to keep a picture of the sword as 'refernce' and then scan for that 'refernce' and have it inform you it is 'there'..

Link to comment
Share on other sites

  • Moderators

You've practicly ignored every post I made.

My examples are clear, and I've spent 3 hours searching, and found nothing. So I posted here.

It is not for a web page, i'm just using that as an example.

Imagine there a picture of a sword on a video game. Is there a way to keep a picture of the sword as 'refernce' and then scan for that 'refernce' and have it inform you it is 'there'..

No, I haven't ignored your posts, I've read them, and I provide the answer, you've actively chosen not to use the right answer, that stems on the verge of being a moron....

Every post you make, you want to argue with the person that gives the right answer. You don't seem very bright.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Explain to me how what you provided is the correct answer. (Note it's not, cause I know what I am looking for an I am trying to explain what it is)

What you provided uses no image as refernce what so ever.

Does you're mom still hold your hand while you use the restroom?

Look at the examples... look at the functions ... look at what the functions are doing.

1. PixelCheckSum() the picture to retain a value.

2. Make sure that value is stored in a variable.

3. Find a unique color of that picture in the top left hand corner that seperates it from the rest of the screen.

4. Using the methods provided, use PixelSearch will find that color, do a PixelCheckSum() of the surrounding area, and you can compare it to your saved sum to see if it matches. If it matches, then GUESS WHAT, you found your picture.

Now I haven't seen Larry's functions in some time, but I know he covers every base when it comes to his coding.

This is the laziness I see in you... You never even bothered to try, just assumed it wouldn't work.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

You may have provided a way for it to work, but it still doesnt work most've the time I tried.

Here is an example of what a friend said to me that arrised this question:

I look for pixel, then check to see if it matches a fingerprint or snapshot I took of a real image.

Edited by lolp1
Link to comment
Share on other sites

  • Moderators

You may have provided a way for it to work, but it still doesnt work most've the time I tried.

Here is an example of what a friend said to me that arrised this question:

Guess you're SOL then... If I were you, I'd start writing what I wanted.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Why does this sound like a recurring nightmare ?

@lolp1: Listen, you are getting straight info from one of the 1337 on this board. Don't antagonize, but rather visualize and then realize that you are at his (and others like him) mercy.

Study the code, if it doesn't work for you then give an example in the form of code you've tried and graphics you're using.

I have used the code in referrrence and it does work. The best thing to do is to try the code exactly as it is and if you have a problem ask, it's that simple.

Edited by Fossil Rock

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

...probably because some people think it's important. Larry's functions are awesome, but they are not the same --> you don't have a human recognizable reference image anywhere. That is a big difference.

AutoHotkey has an imageSearch function that does just what you ask. What I did was that I compiled an AutoHotkey function so that when I call it with command line parameters, it finds the image on screen (if it's there). That function in Autohotkey is accurate and very fast, much faster than Larry's code or a couple of dll's recommended previously on this forum.

BTW, for me it seems that neither one of you didn't quite get what the other one meant.

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...