Jump to content

How to do pixelsearch with restrictions?


nusaki
 Share

Recommended Posts

Hello nusaki,

There is simple step around using PixelGetColor(). However, it will lose the ability to use shade-variations for searching. If you need the shade-varietions. then try defining 4 seperate PixelSearch() controls searching 0,0,100,9 and 0,10,9,20 and 21,10,100,20 and 0,21,100,100.

However there is another more simple way if you need to find a specific pixel color using loops:

For $row = 0 To 100
   For $col = 0 To 100
      If $row >= 10 And $row <= 20 And $col >= 10 And $col <= 20 Then ContinueLoop
      $search = PixelGetColor( $row, $col )
      If $search = $color_to_find Then
         ;do something here
      EndIf
   Next
Next
Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

nusaki,

The speed might be a little slower, however it should not be enough to show a noticeable difference. My example works fine on my end. If it's not working on your end, then it's more than likely to do with the rest of the code in your script. I can't tell you whats wrong without seeing your code. It would be much easier to help you solve your problem if you would show your script. Don't forget to put your script in code tags [ autoit][ /autoi] (just delelte the spaces)

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...