Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.event.InputEvent;
- import java.util.Random;
- import java.awt.*;
- import java.lang.Thread;
- import java.util.Scanner;
- import java.awt.event.MouseListener;
- public class autoclickermain{
- public static void autoclickermain(String[] args) {
- Scanner scanner = new Scanner(System.in);
- System.out.println("Welcome to Dark clicker");
- System.out.print("What is the lower limit of cps wanted?: ");
- int lowercps = scanner.nextInt();
- System.out.print("What is the upper limit of cps wanted?: ");
- int uppercps = scanner.nextInt();
- System.out.println();
- System.out.println("Program will start in 3 seconds... Press "F7" to start/pause);
- public void setDelay(int ms) {
- this.delay = ms;
- }
- try {
- Thread.sleep(3000);
- } catch (Exception e) {
- e.printStackTrace();
- }
- public class randomnumbergen() {
- public static void main(string[] args) {
- usingrandomclass();
- }
- static void usingrandomclass() {
- Random randomgen = new Random();
- int randomint = randomgen.nextint(uppercps) + 1
- }
- }
- AutoClick clicker = new AutoClick();
- clicker.setDelay(1000 / randomnumbergen);
- public void ClickMouse(int button) {
- try{
- robot.mousePress(button);
- robot.mousePress(button);
- robot.delay(delay);
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
- public void keyPressed(KeyEvent e) {
- switch (e.getKeyCode(118)) {
- }
- }
- frame.addMouseListener(new MouseAdapter(){
- public void mouseClicked(MouseEvent e) and keyPressed(KeyEvent e) {
- clicker.ClickMouse(InputEvent.BUTTON1_DOWN_MASK);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement