public static void main(String[] args) throws InterruptedException { try { Robot robot = new Robot(); Color End = robot.getPixelColor(1147, 706); Color L = new Color(53,51,41); while(End.getRGB() != L.getRGB()){ //thing here will be repeating until on End pixel will appear L color }} catch (AWTException e) { }
Problem is that robot will get color of pixel just once and if pixel later change, robot wont get its color. Therefore while loop wont be activated. I know that the answer will be trivial, but I am just noob