that's my code and whats wrong is before i can expand on it any more i need to do a check, let me explain what the code does:< import java.awt.*; import java.awt.event.*; import java.awt.Robot; import java.awt.AWTException; import java.awt.Rectangle; import java.awt.Color; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class GunningBot{ public static void main(String[] args) throws Exception{ Robot robot = new Robot(); Color color1 = new Color(196, 195, 181); Color color2 = new Color(95, 118, 127); Color color3 = new Color(114, 46, 33); Color color4 = new Color(252, 200, 111); { Rectangle rectangle = new Rectangle(0, 0, 1365, 770); { BufferedImage image = robot.createScreenCapture(rectangle); search: for(int x = 0; x < rectangle.getWidth(); x++) { for(int y = 0; y < rectangle.getHeight(); y++) { if(image.getRGB(x, y) == color1.getRGB()) { robot.mouseMove(x, y); robot.mousePress(InputEvent.BUTTON1_MASK); robot.delay(150); robot.mouseRelease(InputEvent.BUTTON1_MASK); break search; } } } } { BufferedImage image = robot.createScreenCapture(rectangle); search: for(int x = 0; x < rectangle.getWidth(); x++) { for(int y = 0; y < rectangle.getHeight(); y++) { if(image.getRGB(x, y) == color2.getRGB()) { robot.mouseMove(x, y); robot.mousePress(InputEvent.BUTTON1_MASK); robot.delay(150); robot.mouseRelease(InputEvent.BUTTON1_MASK); break search; } } } } { BufferedImage image = robot.createScreenCapture(rectangle); search: for(int x = 0; x < rectangle.getWidth(); x++) { for(int y = 0; y < rectangle.getHeight(); y++) { if(image.getRGB(x, y) == color3.getRGB()) { break search; } } } } } } } >
1. finds the Pixel with the indicated color
2. clicks on it
3. repeats step 1 for i different pixel
4. repeats step 2 for a different pixel
this is all to open a game, well a panel in the game
read my bottom post for the question because i couldn't type last night so the above is mostly gibberish.