Axufuris Posted July 24, 2008 Share Posted July 24, 2008 I need some help. For some reason i have this function going but it will not work for some reason. It acts like it finds the second color before it is even on the screen. Please help Func Undock() PrintStatus("Undocking.") MouseClick("left", $Undock[0], $Undock[1], 1, $MouseSpeed) PrintStatus("Black") Do Sleep(1000) Until (PixelGetColor($CheckIfUndocked[0], $CheckIfUndocked[1]) < Dec("000000") + 1 AND PixelGetColor($CheckIfUndocked[0], $CheckIfUndocked[1]) > Dec("000000") - 1) PrintStatus("color") Do Sleep(1000) Until (PixelGetColor($CheckIfUndocked[0], $CheckIfUndocked[1]) < Dec("464B32") + 5 AND PixelGetColor($CheckIfUndocked[0], $CheckIfUndocked[1]) > Dec("464B32") - 5); 15132390 Sleep(3000) CheckPauseStop() Return 3 EndFunc Link to comment Share on other sites More sharing options...
Axufuris Posted July 25, 2008 Author Share Posted July 25, 2008 Come on, Does anybody know how to help me? This is driving me crazy. I don't want to check for an exact color because i am doing this on EVE and the colors change. But that so far seems to be the onlyway it will work. I want to check between a small range of colors. Link to comment Share on other sites More sharing options...
cppman Posted July 25, 2008 Share Posted July 25, 2008 Look at PixelSearch. Miva OS Project Link to comment Share on other sites More sharing options...
Axufuris Posted July 25, 2008 Author Share Posted July 25, 2008 Look at PixelSearch.I looked at pixelSearch and it doesn't seem like what i would need. I already know what spot i'm checking the pixel at. I don't have to look for the pixel, i just need to see if that spot turns to that color or really close. Link to comment Share on other sites More sharing options...
cppman Posted July 25, 2008 Share Posted July 25, 2008 (edited) You don't need to "search" for the pixel. You can just use it to specify the color shade variation (0 - 255). Something like this, anyways... Func IsPixelMatch($x, $y, $color, $variation = 0) PixelSearch($x, $y, $x, $y, $color, $variation) return not @error ;or.. return @error <> 1 EndFunc Edited July 25, 2008 by cppman Miva OS Project 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