Sign in to follow this  
Followers 0
Qvintus

Pixelsearch is broke or just me?

8 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Are you trying to bot a game?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

(1 = True)

This statement would evaluate to true in AutoIt. It was not the problem.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Have you checked to make sure it actually is white and not some similar off-white?

Share this post


Link to post
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
Sign in to follow this  
Followers 0