Jump to content

Pixelsearch not 100% reliable


 Share

Recommended Posts

I have a simple macro that searches inside of a rectangle area it was made to detect 2 different pixel colors problem is sometimes they do sometimes the don't or sometimes they do when the pixel color is not present on the screen. I don't know what's wrong and I've spent all day trying to fix this to no avail.

Func ShowMessage()
    
PixelSearch (365, 65, 625, 95, 6961208)
If @error Then
    Send (2);;;rend;;;
Else
EndIf

PixelSearch (365, 65, 625, 95, 12622435)
If @error Then
    Send (1);;;hamstring;;;
Else
EndIf

EndFunc
Link to comment
Share on other sites

It would be hard to help you with no way to duplicate your symptoms. PixelSearch() works very well for me, and I've never noticed any unreliability in the results.

What is it you are testing for? A static icon, or a game sprite, or...what?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

It would be hard to help you with no way to duplicate your symptoms. PixelSearch() works very well for me, and I've never noticed any unreliability in the results.

What is it you are testing for? A static icon, or a game sprite, or...what?

:)

Sorry if I wasn't more specific. It's an icon for a game sprite for World of Warcraft. It searches for a specific color within the Icon I made sure that the color it searches for is unique to that Icon the same with the other 2nd Icon. The odd thing is the script will give me odd results, sometimes it works like a charm, sometimes it doesn't detect the 2 icons and sometimes it detects one not the other. It's much too unreliable.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...