Screen Scraping
-
Ok, I'm trying to create a new interface for an existing program. Basically I want to get information (pictures, text) and port it into a new window in a different format. I've come to realize that screen scraping is probably my best bet. My problems are: How do I go about screen scraping? All I can find involves scraping from webpages, this is a windows application. Is there some way to get a "Window ID" to identify which screen I'm scraping from? Does the screen I'm using need to be on top? because I am creating a new interface because I want to use it. Is there a better way to go about this? Any advice on where to begin? thanks, jack
-
Ok, I'm trying to create a new interface for an existing program. Basically I want to get information (pictures, text) and port it into a new window in a different format. I've come to realize that screen scraping is probably my best bet. My problems are: How do I go about screen scraping? All I can find involves scraping from webpages, this is a windows application. Is there some way to get a "Window ID" to identify which screen I'm scraping from? Does the screen I'm using need to be on top? because I am creating a new interface because I want to use it. Is there a better way to go about this? Any advice on where to begin? thanks, jack
This is a perticularly troublesome issue since you are dealing with a windows application you want to scrape the data from. You can get the window handle! It is kind of involved but you can get it from it's location, or, you can get it from the module handle but you'll need to use windows API which involves some interop. In the end, you might not even be able to get the information depending on if standard windows controls are used or not. Assuming you have the window handle and that the data you are getting is in a standard list box, you can get at it. You mentioned picures though and I know of no non-convoluted way to scrape that. You can get a binary image right off the screen but the window will need to be made topmost, but what if another window overlaps between the time you bring it to the top and you start scraping? Screen scraping is generally reserved for application where data is in text that is rendered to a destination that supports reading it back as text. In the GUI world you'll need to rely on asking some control for that information and that may or may not be possible, depending on the control which rendered it. If possible, I'd look at getting at the data in some other way, perhaps its storage medium? Probably not much help but...