'How to scrape an application?/How to get information from a desktop application?

I'm sorry if the title doesn't accurately represent my question, it was the closest thing I could think of that somewhat represents it.

I'm trying to figure how to get information from a desktop application. In this case, I'm trying to be able to get chat logs from a game and use them. (kind of like a web scraper but for a game/like using screen scraping without having to look at something) For example, putting them in a text file or automatically saying something if someone else says something.

To be even more specific, I'm trying to extract and use console logs in a valve game. (If you don't know what that is, it probably doesn't matter.)

Sorry if this all seems kind of stupid, but does anyone know where I can start?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source