Hidden Posted February 7, 2010 Share Posted February 7, 2010 Hey, I'm trying to get Pixelsearch to press a key once it finds a pixel colour on a certain part of the screen. This is what I've got but it just doesn't seem to want to work. While 1 If PixelSearch ( 680, 808, 707, 832, 0X721665, 50) then Sleep(243) Controlsend("Window", "", "", "F") Endif WEnd I also tried While 1 PixelSearch ( 680, 808, 707, 832, 0X721665, 50) If @Error Then ;Nothing Else Sleep(243) Controlsend("Window", "", "", "F") Endif WEnd So basically I want it to look between a square made up by the 4 co-ords, to find that colour and I tried to give it 50 extra shades just to see if it would work... Any help? Link to comment Share on other sites More sharing options...
Theri Posted February 7, 2010 Share Posted February 7, 2010 Have you tried adding some code to know if its finding your pixel? Not all programs will respond to send or controlsend. Link to comment Share on other sites More sharing options...
Hidden Posted February 7, 2010 Author Share Posted February 7, 2010 Have you tried adding some code to know if its finding your pixel? Not all programs will respond to send or controlsend.I'm very new to this... I wouldn't know where to start. Basically, if it's finding the pixel, it's meant to press F... Isn't it? :/And the ControlSend does work on this particular program, I have used it on it's own. Link to comment Share on other sites More sharing options...
Theri Posted February 7, 2010 Share Posted February 7, 2010 Are you sure about your coords for the search area? I don't know what resolution you run at but for me that is an area off my screen. Course I'm using a laptop. I tried your code, with changed coords, and it found your hex against an image painted to that color so it does work if that pixel color is present. Link to comment Share on other sites More sharing options...
Hidden Posted February 7, 2010 Author Share Posted February 7, 2010 Are you sure about your coords for the search area? I don't know what resolution you run at but for me that is an area off my screen. Course I'm using a laptop. I tried your code, with changed coords, and it found your hex against an image painted to that color so it does work if that pixel color is present.I'm on a 24' screen so yes, that is on my screen, I'm mostly unsure about the colour really. Link to comment Share on other sites More sharing options...
Theri Posted February 7, 2010 Share Posted February 7, 2010 Not sure what to tell you then outside of making sure you have the color right. :| 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