/** * move the mouse from the current position to the offset position given by the parameters * @param xoff horizontal offset (< 0 left, > 0 right) * @param yoff vertical offset (< 0 up, > 0 down) * @return 1 for success, 0 otherwise */ public static int move(int xoff, int yoff) { return move(at().offset(xoff, yoff)); }
/** * move the mouse from the current position to the offset position given by the parameters * * @param xoff horizontal offset (< 0 left, > 0 right) * @param yoff vertical offset (< 0 up, > 0 down) * @return 1 if possible, 0 otherwise */ public int mouseMove(int xoff, int yoff) { try { return mouseMove(Mouse.at().offset(xoff, yoff)); } catch (Exception ex) { return 0; } }