-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMouseBotInvoker.java
More file actions
40 lines (28 loc) · 949 Bytes
/
MouseBotInvoker.java
File metadata and controls
40 lines (28 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package Projects;
import java.awt.event.InputEvent;
import java.lang.Thread;
import java.util.Scanner;
public class MouseBotInvoker {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("----MouseBot----");
System.out.println("Enter the desired number of clicks: ");
int clicks = scanner.nextInt();
System.out.println("Enter delay between clicks in milliseconds: ");
int delay = scanner.nextInt();
System.out.println();
System.out.println("AutoClicker will start in 3 seconds.");
try {
Thread.sleep(3000);
}
catch (Exception e) {
e.printStackTrace();
}
MouseBot MouseBot = new MouseBot();
MouseBot.setDelay(delay);
for (int i=0; i<clicks; i++) {
MouseBot.click(InputEvent.BUTTON1_MASK); //Can be exchanged for different button masks.
}
System.out.println("AutoClicker Finished.");
}
}