View Full Version : ScrollBot - yeah, now its easier to read appliances' scripts!
n3ss3s
08-02-2007, 03:43 PM
Its nothing big, just a small snippet.
import java.awt.Robot;
import java.awt.event.KeyEvent;
// by n3ss3s
// Only for educational purposes or scrolling.
class ScrollBot {
public static void main (String [] args) throws Exception {
int speed = 500; // Time between a scroll
int i = 0;
int scrolls = 1000; // How many times to scroll
Robot robo = new Robot();
while (!(i == scrolls) {
robo.mouseWheel(1);
robo.delay(speed);
i ++;
}
}
}
Donations will be accepted lol
n3ss3s
08-03-2007, 12:35 PM
I'd make a java typeSend but I dont know what to use for getting the key code.
Hm. Is that necessary? Because wouldn't something like this work:
public void typeSend(String typewhat, int delay ) throws Exception {
int a = 0;
int b = 0;
int txtLength = typewhat.length();
char[] theTxt = new char[txtLength];
if (typewhat != null && typewhat.length() > 0) {
for( a = 0; a < txtLength; a++) {
theTxt[a] = typewhat.charAt(a);
}
for(b = 0; b < theTxt.length; b++) {
//Something to send the character..
Thread.sleep(delay);
}
}
}
Just takes all the characters from the string to an array.. Then would send the characters 1 by one.. Not sure at all because I just quickly put that together and didn't test.
Bobarkinator
08-04-2007, 05:13 PM
Don't you need to make them private ints?
n3ss3s
08-05-2007, 03:59 PM
GoF, I would but I need to use the KeyEvent class to get the keycodes to use keyPress() and theres sooo many things to put in the constructor and I have no idea what to use there..
Santa_Clause
08-06-2007, 10:03 AM
Sorry for not knowing anything about Java...but how the hell do I run this?
Also, are you going to post a picture on your millenium thread n3ss3s?
n3ss3s
08-06-2007, 11:53 AM
I could... I hope millenium means 1000 or like that :D
Is it supposed to be funny or..?
EDIT: Nope, I wont post a pic, Ill post a script :)
Santa_Clause
08-07-2007, 01:48 PM
Ok...now how do I run this JAVA application thing?
Hugolord
08-07-2007, 01:49 PM
im guessing save it on notepad as .jar?
n3ss3s
08-07-2007, 01:52 PM
Nooo! You have to compile into a class file either using javac straight on tha cmd or then use textpad or sumting.. Then, you just type to cmd "java Scrollbot"
Smartzkid
08-07-2007, 01:53 PM
Save it in notepad as .java, compile it into a .class (javac.exe?), then run it with...java.exe?
Hugolord
08-07-2007, 01:54 PM
oh right woops my bad sorry lol
n3ss3s
08-07-2007, 01:58 PM
yes.
Harry
08-07-2007, 02:57 PM
Yeah, is there a tut somewhere on how to run JAVA? It is my first time .. I sdon't really understand what you are saying .. how do I compile it into a .class and where is java.exe and javac.exe?
:noob alert: :p lol
-Harry
n3ss3s
08-08-2007, 08:43 AM
You need to have Java Development Kit (JDk) which you can dl from Java's home. (java.sun.com I think).
Then, (Java.exe is in your JRE/bin folder in your Java folder and Javac.exe is in your JDK/bin folder in your Java folder.
Then.. god damit im too lazy to explain, just download JDK and textpad or netbeans or notepad++ and open the file with one of those and press compile and then press run lmao.
Santa_Clause
08-08-2007, 10:48 AM
I am so not going to bother...
Like hundreds of mb's to dl just to run scrollbot :)
n3ss3s
08-08-2007, 11:11 AM
I havent said anyone should bother :)
EDIT: Lol, you cant play runescape without Java, you cant run any Java without Java.
The Element
08-10-2007, 09:56 PM
Wrong. You can run runescape with the JRE. Only the JDK comes with javac.exe etc.
n3ss3s
08-11-2007, 10:14 AM
:duh:
If you have JRE then you have Java.
So, you cant run runescape without Java.
JDK is Java Development Kit and that you DONT need to play rs...
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.