Qvintus Posted May 21, 2010 Share Posted May 21, 2010 (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 May 21, 2010 by Qvintus Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 21, 2010 Share Posted May 21, 2010 Are you trying to bot a game? Link to comment Share on other sites More sharing options...
JohnOne Posted May 22, 2010 Share Posted May 22, 2010 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 More sharing options...
Richard Robertson Posted May 22, 2010 Share Posted May 22, 2010 (1 = True) This statement would evaluate to true in AutoIt. It was not the problem. Link to comment Share on other sites More sharing options...
JohnOne Posted May 22, 2010 Share Posted May 22, 2010 Of course it does, so the problem is the colour is just not present or it cannot be found (most likely not wanting to be found). 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 More sharing options...
Qvintus Posted May 22, 2010 Author Share Posted May 22, 2010 (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 Edited May 22, 2010 by Qvintus Link to comment Share on other sites More sharing options...
Fainth Posted May 22, 2010 Share Posted May 22, 2010 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 More sharing options...
Richard Robertson Posted May 23, 2010 Share Posted May 23, 2010 Have you checked to make sure it actually is white and not some similar off-white? Link to comment Share on other sites More sharing options...
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