How do I...
Author |
Message |
Fozefy
|
Posted: Wed Sep 13, 2006 2:22 pm Post subject: How do I... |
|
|
Hi there, this is my first time posting on your site, but I have read some of your tutorials and other things. I am quite new to java and I can't seem to find the code to do what I need using this site or google.
I'm trying to get Java to check the colour of parts of the screen that are not part of a java run window and then use the mouse to click on it if it is the proper colour.
I am able to use the robot method without any problems to control the mouse, but I can't figure out how to check the colour and compare it.
My guess would be that I would have to have java access a file with the colour in it and compare the colour in the file to the colour on the screen, unless java lets me input, like amounts of red, green and cyan. But I still require the line of code to actually check the colour.
Any help would be apprieciated, even if the answer is that this code does not exist, so thankyou in advance. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Ultrahex
|
Posted: Wed Sep 13, 2006 3:48 pm Post subject: (No subject) |
|
|
#1, I'm not gonna bother linking to rules but your topic of this post is horrendous.
#2, You might want to get to the point also with your problem, then explain in a list of smaller details/issues, just a suggestion.
My Reply: I do not believe this is possible, i know its possible to use getPixel and such if it inside the program, but im pretty sure you cannot outside the program.(i am not 100% certain, but i have done some searching myself and came up with nothing). |
|
|
|
|
![](images/spacer.gif) |
Fozefy
|
Posted: Wed Sep 13, 2006 11:19 pm Post subject: (No subject) |
|
|
sry, I didn't see any rules on posting a topic...but I do understand what it should read, and I would change it now, but there is no edit button
In summary, I need a command that will get the colour of a certian pixel on the screen(not a java run window), by checking the whole screen for this colour.
I will try and use the getPixel command and see if I can come up with anything, if anyone knows how to make this work, please let me know, thankyou. |
|
|
|
|
![](images/spacer.gif) |
OneOffDriveByPoster
|
Posted: Thu Sep 14, 2006 7:42 am Post subject: (No subject) |
|
|
Try Google for "java screen capture". Don't know if the stuff helps. |
|
|
|
|
![](images/spacer.gif) |
|
|