DNnlee Posted January 22, 2009 Share Posted January 22, 2009 (edited) Hi, I'm trying to make my program recognize an image that is part of a bigger image. the bigger image will be dynamic, and the part of the image that i want to match, might not be there all the time. example: i have a picture that's 10 x 10 pixel, and i wanna scan it 2x2 pieces at a time, until one of the 2x2 scans matched up with the pixel count or image i want. goal: to make my mouse click on the image IF the desired image is found. $IQ = pixelchecksum(28,192,39,195);;;;;;; scans a Certain area If $IQ = 2975549012 then ;;;;;;;;;; desired image pixel count $Modifier = 5 ElseIf $IQ = 4109728171 Then;;;;;;;;;; desired image pixel count $Modifier = 4 Else $Modifier = 0 EndIf If $Modifier >= 4 Then Sleep(200) mouseclick("Left", 80,195);;;;;;;;;clicks on image EndIf my script here so far, only scans 11 by 3, and its the same 11x3 everytime.. the actual whole bigger picture that could be scanned, is something like 30x5. any idea how to make the script scan different parts of the picture until it finds the desired image? thanks Edited January 22, 2009 by DNnlee Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2009 Share Posted January 22, 2009 If the image you are searching for always look the same try the "Image Search Library" .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
DNnlee Posted January 22, 2009 Author Share Posted January 22, 2009 If the image you are searching for always look the same try the "Image Search Library"the desired images will always look the same, but might appear at different locations of the screen, and MIGHT be TRANSPARENT and have another undesired image UNDER it to trick my script... so this imagesearch should be able to find it still right? if so thanks XD 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