I have a question. Is there a way for me to search the screen for text, possibly store the text, copy, paste, and click on links on some kind of forums? I’m developing a program that will scan the screen for certain text and do things such as alert me to certain posts made and things like that. Thank you.
you mean like, RSS feeds?
No, just scanning the screen for text. For example, if I told the program to search for the word “the” it would tell me how many matches, where the first one is, etc.
define “screen”
if screen is the part you see, just take screen captures / screenshots and execute some text recognising algoritms
There is probebly some stuff done for you in JAI but mind you JAI comes with no recommendation to use or to not use it. I haven’t used it and I’ve heard a lot of differend stuff about it.
By “screen” yes, I mean the area you see.
You need OCR - google for ‘screen readers’
if you’re wanting the program to automate things like clicking on links and things like that, you’d be much better off just writing a web crawler and just processing the actual text of the webpages (because with screen capturing, it would be near impossible to “detect” what text is an actual link, depending on the webpages individual style)
an easy way to do this is just to use the URL class’ openConnection() method. If you need more advanced HTTP control, there are a few other java classes, or you can just open a socket, make your request, and parse the results. you’ll find it much easier than scanning for pixel values…
if you’re taking the raw socket HTTP route, read this first: http://www.jmarshall.com/easy/http/