this is the code i have so far:
< 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; import java.awt.Point; import java.lang.Object; import java.awt.geom.Point2D; import java.until.Arrays: public class Poker { public int main(String[] args) throws Exception { Robot robot = new Robot(); Color color1 = new Color(24, 26, 25); int[] Array; Array = new int[5]; Array[0] = (new Color(24, 26, 25)).getRGB(); Array[1] = (new Color(28, 40, 36)).getRGB(); Array[2] = (new Color(93, 89, 79)).getRGB(); Array[3] = (new Color(49, 51, 46)).getRGB(); Array[4] = (new Color(17, 30, 25)).getRGB(); Rectangle rectangle = new Rectangle(0, 0, 1365, 770); BufferedImage image = robot.createScreenCapture(rectangle); for(int x = 0; x < rectangle.getWidth(); x++) { for (int y = 0; y < rectangle.getHeight(); y++) { int[] pixels = image.getRGB(0, 0, image.getWidth(), image.getHeight(), null, 0, image.getWidth()); { for (int i = 0; i < pixels.length; i++) { if (Array.equals(search, Array.copyOfRange(pixels, i, i + search.length))) { if(image.getRGB(x, y) == color1.getRGB()) { robot.mouseMove(x, y); robot.mousePress(InputEvent.BUTTON1_MASK); robot.delay(10); robot.mouseRelease(InputEvent.BUTTON1_MASK); } } break; } } } } } } >
i am getting 4 errors
1 java:42 cannot find symbol pointing at the search
2 java:42 cannot find symbol pointing at the search
3 java:42 operator + cannot be applied to int,search.length
4 java:42 cannot find symbol pointing at the Array.copyOfRange
now what this program is supposed to do:
take a screenshot buffer it and search through it until it finds 5 pixels with the same RGB values as in the Array and then using that same screenshot find the first pixel and move the mouse to it.
PS. sorry bout the weird looking deal im coding in NotePad++ and i guess those lines that are wrapped around are too long for the post sorry again