- Joined
- Jan 21, 2007
- Sythe Gold
- 1,234
- Messages
- 14,211
Having a long time I finally was able to make a program that tells you the colors of every pixel on my screen. (I was doing this is trouble shoot it so I could figure stuff out and stuff. Gunna change it some to use in bots if I get it to run faster)
I have 1440 by 900 pixels which is 1,296,000 pixels on my screen. My program takes 1:37 minutes to display all the pixels. (I got dual core and Niv. GFo. 8600.)
Thats much to damned long. :/
I wrote this in simple code and it took like 2 hours to make it so that it accualy did the whole screen not just to top row or from corner to corner. If someone could help me make this run faster I would be very happy.
Don't tell me anything about objects and shit... I was making something simple this time and will probelly use objects when I accualy make some sort of bot. :/
I have 1440 by 900 pixels which is 1,296,000 pixels on my screen. My program takes 1:37 minutes to display all the pixels. (I got dual core and Niv. GFo. 8600.)
Thats much to damned long. :/
I wrote this in simple code and it took like 2 hours to make it so that it accualy did the whole screen not just to top row or from corner to corner. If someone could help me make this run faster I would be very happy.
Code:
import java.awt.*;
public class test
{
static boolean con = true;
static boolean cony = true;
static boolean conx = true;
public static void main(String[] args) throws Exception
{
Robot auto = new Robot();
{
int x = 0;
int y = 0;
int r = 1;
int x2 = 1440;
int y2 = 900;
while(cony)
{
if (y < y2)
{
x = 0;
conx = true;
while(conx)
{
if (x < x2)
{
Color pxcolor = auto.getPixelColor(x,y);
System.out.println("" + pxcolor + r);
x ++;
r ++;
}
else if (x > x2)
{
conx = false;
y ++;
}
else
{
conx = false;
y ++;
}
}
}
else if (y > y2)
{
cony = false;
}
else
{
cony = false;
}
}
}
}
}
Don't tell me anything about objects and shit... I was making something simple this time and will probelly use objects when I accualy make some sort of bot. :/










