Jump to content

Pixelsearch is broke or just me?


Recommended Posts

Hello I triet to do some project yesterday where I needed Pixelsearch, but everytime it fail, so thought it was just me.

Then I tested it just searching for a white color, on a completely white page.

Nothing found O.O

Any idea why this is?

While 1
$msg=GuiGetMsg()
If $msg=-3 Then Exit

    $color = PixelSearch(154, 238, 902, 667, 0xFFFFFF)
If IsArray($color) = True Then
MsgBox(2,"","Found color")
EndIf
WEnd
Edited by Qvintus
Link to comment
Share on other sites

Try

While 1
$msg=GuiGetMsg()
If $msg=-3 Then Exit
$color = PixelSearch(154, 238, 902, 667, 0xFFFFFF)
If IsArray($color) Then
   MsgBox(2,"","Found color")
EndIf
Sleep(10)
WEnd

IsArray returns 1 is successful, Im dont think True is valid.

And Im not sure your pixel serach should be in that loop

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Are you trying to bot a game?

No I'm not

Try

While 1
$msg=GuiGetMsg()
If $msg=-3 Then Exit
$color = PixelSearch(154, 238, 902, 667, 0xFFFFFF)
If IsArray($color) Then
   MsgBox(2,"","Found color")
EndIf
Sleep(10)
WEnd

IsArray returns 1 is successful, Im dont think True is valid.

And Im not sure your pixel serach should be in that loop

Hmm ok, I can't get it work in my current project, but works if I'm just editing one of my old projects.

Thanks to you both :idea:

Edited by Qvintus
Link to comment
Share on other sites

Are you on a DX fullscreen ? My current Project involves a Cam-Monitoring that does Dx9 in fullscreen and im failing to hook properly into the applications DX calls.

So the whole pixelsearch stuff is useless, did you check what colors you get?

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...