Moonbringer Posted June 8, 2023 Posted June 8, 2023 Heya there! In my script i need to check a defined displayarea for the ocurrance of 4 differt defined colors. (Green, 2 different Reds/Oranges, and some shade of white/gray) now my question is if it is possible to pass some kind of array of colors for pixelsearch to find them, instead of calling PixelSearch 4 times for the same area? Or if there is any other more efficent way to do this? This is my current code: Global $ColorsToSearchFor[4] = [0xEBA900,0xF34800,0x3BCB55,0xD5492E] Func searchColors() Local $found,$i For $i=0 To UBound($ColorsToSearchFor)-1 $found = PixelSearch(546, 615, 1362, 759,$ColorsToSearchFor[i]) If IsArray($found) Then Return True EndIf Next Return False EndFunc Any help / suggestion appricated! Thx!
Moderators JLogan3o13 Posted June 8, 2023 Moderators Posted June 8, 2023 @Moonbringer welcome to the forum. Please post a screenshot of the area you're attempting to capture. I am curious whether you're trying to grab too large an area and can narrow it down, or if there is another way to better accomplish what you're after. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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