I couldn't wait to get this script out so here it is: Java Script for an autoclicker, It clicks for you every certain amount of seconds:
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.util.*;
public class Engine {
private static Robot mainBot;
private int mouseClicks = 0;
private long OldTime = System.currentTimeMillis();
private int clickTimer = 5000;
public void clickMouse() {
mainBot.mousePress(InputEvent.BUTTON1_MASK);
mainBot.mouseRelease(InputEvent.BUTTON1_MASK);
}
public void startBot() {
while(true) {
if(System.currentTimeMillis() - OldTime > clickTimer) {
OldTime = System.currentTimeMillis();
clickMouse();
mouseClicks++;
System.out.println("Mouse Clicked #" + mouseClicks);
}
}
}
public Engine() {
Scanner sc = new Scanner(System.in);
System.out.print("How ften do you want to click (seconds)");
clickTimer = Integer.parseInt(sc.nextLine()) * 1000;
System.out.println("Clicking every " + clickTimer / 1000 + " seconds.");
startBot();
}
public static void main(String args[]) {
try {
mainBot = new Robot();
} catch(Exception e) {
System.out.println("Error: Autoclicker failed to start!");
}
new Engine();
}
}
Keep scripting!
Java for Windows
Java for Mac
Java for Linux
Surf the Blog
Tuesday, September 6, 2011
First Post
Hey Guys and Girls this is my first post! Yay! For my first post I want to recommend a completely virus-free java interpreter. I use it for ALL my scripts. Its called Eclipse. Here it is for Mac, Linux AND windows:
Eclipse for Windows
Eclipse for Mac
Eclipse for Linux
Have fun with it, and keep checking back! I'll have some new freeware tomorrow!
Eclipse for Windows
Eclipse for Mac
Eclipse for Linux
Have fun with it, and keep checking back! I'll have some new freeware tomorrow!
Subscribe to:
Comments (Atom)