From: Matt O. (Home) <mat...@gm...> - 2011-09-19 12:51:30
|
On 17 September 2011 14:41, Steve Graham <jsg...@ya...> wrote: > I googled for this and found this link: > http://www.velocityreviews.com/forums/t167359-how-to-extract-text-from-windows.html > > It talks about Window api functions such as GetWindowText which can help. > When I grep'd the ipl and lower directories for it, the only hits were .exe > routines. So, I'm guessing that this api has been defined, but is not used > in any sample programs in the ipl. > Any advice on how to use it? I'm not sure why anyone is mentioning screen scraping and OCR. You are right to think that you can just pick up the text entry events sent to the window. You might want to look at AutoHotkey (http://www.autohotkey.com/) you can use this to either "tee" the user input to your terminal program /or/ inspect the labeled elements of the windows program by name (a far better idea). I used something like this to interface some windows based software for a laser scanner with a low level embedded robotics chassis where I needed to send some stuff over a socket from the command line. It has a nice macro record feature, so you can record cycling through the entry boxes and then save this macro. Open it up in an editor and just add a bit of foo to dump it into your terminal program, then your users will just have to run your macro with the window open, or you just set the macro to trigger on "title change" (or whatever) of the window for the application of interest. http://rosettacode.org/wiki/Category:AutoHotkey might help you get up and running too. Best, Matt |