lolp1 Posted September 29, 2006 Share Posted September 29, 2006 How would I compare pixels. EG: I take a screen shot of a basktetball, and then run the script, and it searches the screen for the same pic.. Any help apperciated. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 PixelCheckSum() 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 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 More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 (edited) 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 September 29, 2006 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 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 More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 Thanks, exzactly what I was looking for. Link to comment Share on other sites More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 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. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 Here is a better explination of what I am talking about:It already knows what the pic looks like: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 More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 Here is a better explination of what I am talking about:It already knows what the pic looks like: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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 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 More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 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. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 (edited) 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 September 29, 2006 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 (edited) 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 September 29, 2006 by lolp1 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 29, 2006 Moderators Share Posted September 29, 2006 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 More sharing options...
lolp1 Posted September 29, 2006 Author Share Posted September 29, 2006 I don't even know where to start, thats why I posted in the first place. Link to comment Share on other sites More sharing options...
Fossil Rock Posted September 29, 2006 Share Posted September 29, 2006 (edited) 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 October 1, 2006 by Fossil Rock Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
tuape Posted September 30, 2006 Share Posted September 30, 2006 ...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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now