public static void myMouseMove(int x,int y,boolean flag) throws InterruptedException {
PointerInfo info = MouseInfo.getPointerInfo();
Point point = info.getLocation();
int v =(point.x-BasicLogic.bufferPoint.x);
boolean b =BasicLogic.bufferPoint.x>250 && v>200;
if (b && !flag ){
System.out.println("SM 147 "+BasicLogic.bufferPoint+" "+v +" "+b +" "+point);
throw new InterruptedException();
}else {
BasicLogic.bufferPoint = new Point(x,y);
robot.mouseMove(x, y);
BasicLogic.flagMouseMove = false;
}
System.out.println("SM 154 "+BasicLogic.bufferPoint+" "+v +" "+b +" "+point);
}
ivan@User:~/IdeaProjects/ClicClacer/out/artifacts/ClicClacer_jar$ java -jar ClicClacer.jar
SA 9 Linux
SA 10 {"p":"/home/ivan/.id.txt","id":"654409593"}
/home/ivan/.id.txt
Problem with properties
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.example.ui.window.UiJFram.<init>(UiJFram.java:34)
at org.example.Main.main(Main.java:62)
Caused by: java.lang.NullPointerException
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:149)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:111)
at org.example.data.ControlPoints.<clinit>(ControlPoints.java:33)
... 2 more
try {
FileInputStream fis;
Properties properties = new Properties();
fis =new FileInputStream("src/main/resources/config.properties");
properties.load(fis);
filepath = properties.getProperty("filepath");
filepathCounter = properties.getProperty("pathCounter");
System.out.println(filepath);
fis.close();
}
while (objectInputStream.available() >0) {
p = (ControlPoints) objectInputStream.readObject();
System.out.println("ioheorg"+objectInputStream.available());
}
} catch (FileNotFoundException e) {
System.out.println("ein catch");
} catch (IOException e) {
System.out.println("cvein catch");
} catch (ClassNotFoundException e) {
System.out.println("drein catch");
}