Christoph_ Posted October 24, 2006 Share Posted October 24, 2006 Is there any userdefinited function that allows autoit to search the screen for a specific picture ? Maybe with a shade variation which allows something like 90% match or so ? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 24, 2006 Moderators Share Posted October 24, 2006 Is there any userdefinited function that allows autoit to search the screen for a specific picture ? Maybe with a shade variation which allows something like 90% match or so ?Not shade variation for the picture, but Larry made one that requires some thinking on your part.http://www.autoitscript.com/forum/index.ph...mp;#entry134394 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...
Christoph_ Posted October 24, 2006 Author Share Posted October 24, 2006 Not shade variation for the picture, but Larry made one that requires some thinking on your part.http://www.autoitscript.com/forum/index.ph...mp;#entry134394Pixelchecksum won't do (unfortunately) because the pixels change every time a little bit (about +-5/255), so one time its FFAFFF and the next time it's FFAAFF etc...Pixelchecksum returns a totally different number each time (even with so little changes) so it won't do for me. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 24, 2006 Moderators Share Posted October 24, 2006 Pixelchecksum won't do (unfortunately) because the pixels change every time a little bit (about +-5/255), so one time its FFAFFF and the next time it's FFAAFF etc...Pixelchecksum returns a totally different number each time (even with so little changes) so it won't do for me.Sounds like your off to the wonderful world of writing UDF's 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...
Christoph_ Posted October 24, 2006 Author Share Posted October 24, 2006 (edited) Sounds like your off to the wonderful world of writing UDF's Actually Autohotkey can do this, however I prefer Autoit over Autohotkey. If there is no way to do this in Autoit I have to use Autohotkey in this case. Edited October 24, 2006 by Larry Link to comment Share on other sites More sharing options...
Christoph_ Posted October 24, 2006 Author Share Posted October 24, 2006 (edited) No, this function will not help you... it is only as good as PixelChecksum.Lar.Hate to correct you, but it is a little more advanced, checksum can't do this and that's what I need:*n: Specify for n a number between 0 and 255 (inclusive) to indicate the allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of each pixel's color. For example, *2 would allow two shades of variation. This parameter is helpful if the coloring of the image varies slightly or if ImageFile uses a format such as GIF or JPG that does not accurately represent an image on the screen. If you specify 255 shades of variation, all colors will match. The default is 0 shades.However you COULD do it with pixelsearch, but it would mean looping through the whole image; loop through the screen and try to find an errorfree pattern (shadevariation could be set done in pixelsearch).Well, maybe I will do. Lotsofwork. Edited October 24, 2006 by Christoph_ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 24, 2006 Moderators Share Posted October 24, 2006 Hate to correct you, but it is a little more advanced, checksum can't do this and that's what I need:You need to re-read his statement. He's saying his function won't help you, because it uses PixelCheckSum(). There's no pre processed functions written currently that are going to allow you to do what you want to do. So, you have to either A.) Use AutoHotKey for your needs and scrap your AutoIt project. B.) Settle for a VERY slow alternative within AutoIt in a function written by you. C.) Find a DLL that will do what you are asking, and use that within AutoIt. D.) Find a way to use both programs together. 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...
Christoph_ Posted October 24, 2006 Author Share Posted October 24, 2006 Now don't turn this into a flaming contest. I have though about doing a patternbased pixelsearch btw, however it's far more work than "brute forcing" the thing. But I need to call this function maybe once every 120+s so speed is not an issue at all. My question is answered however, so feel free to close if you dislike threads with links to AutoHotkey. Link to comment Share on other sites More sharing options...
Recommended Posts