java怎样编写刷课脚本
发布网友
发布时间:2023-06-27 13:54
我来回答
共1个回答
热心网友
时间:2024-11-30 07:40
java编写刷课脚本的程序如下:1、public static void main(String[] args) throws AWTException { Robot robot = new Robot();
2、Random random = new Random(); inta=0;robot.delay(3000);
3robot.mouseMove(1200,700);
4a=Math.abs(random.nextInt())%100+50;
5robot.delay(a);
6robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
7a=Math.abs(random.nextInt())%50+50;
8robot.delay(a);
9robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); }