WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: twb on September 04, 2013, 09:59:32 AM

Title: How to screen scrape?
Post by: twb on September 04, 2013, 09:59:32 AM
I'm not a Windows developer by trade, I code on larger IBM computers, but I have taken over our WinBatch scripting/programming.
I might be using the wrong keywords, I searched the new, and old, forum for "screen scrape" and "screen scraping", etc...

I need to be able to have WinBatch script start a Windows application, perform some entries to prompts, and then pull some of the values displayed off of the resulting Window screen.
We can run the Windows application and have prompts entered,but, have not yet figured out how to "screen scrape" values from the Window.
Is there a document, or example, I can look at? Am I using the wrong keywords?

Thank you,
Tom
Title: Re: How to screen scrape?
Post by: Deana on September 04, 2013, 10:15:40 AM
The answer really depends on the type of window you are dealing with and what type of data you are trying to get.






Title: Re: How to screen scrape?
Post by: twb on September 04, 2013, 11:17:52 AM
Thank you Deana.

What I have learned since posting the question is the Windows software is written in a Windows version of COBOL and looks like old style Green screens, text only. They do not get generated by a Windows API.  Another developer here thinks we cannot read them because of that, I don't like to think anything is impossible.  Do you think one of the 3 links you posted will help with that style of screen?

Thanks again,
Tom
Title: Re: How to screen scrape?
Post by: Deana on September 04, 2013, 11:29:09 AM
Quote from: twb on September 04, 2013, 11:17:52 AM
Thank you Deana.

What I have learned since posting the question is the Windows software is written in a Windows version of COBOL and looks like old style Green screens, text only. They do not get generated by a Windows API.  Another developer here thinks we cannot read them because of that, I don't like to think anything is impossible.  Do you think one of the 3 links you posted will help with that style of screen?

Thanks again,
Tom

Are you able to select/copy the text using the keyboard?
Title: Re: How to screen scrape?
Post by: twb on September 04, 2013, 11:48:28 AM
Unfortunately we cannot find a way to copy the screen text via keyboard or mouse.  :(

I've been IM'ing with a team here at work that does nothing but Winbatch scripting and they do not see a way to grab the data from the screens. They have been using Winbatch for 10 years, I'm more like a 10 week Winbatch user.  I'll report back if I can get additional data that may help resolve this.

Thank you,
Tom
Title: Re: How to screen scrape?
Post by: Deana on September 04, 2013, 12:08:03 PM
Does the application support piping that text to an output file? http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/DOS+Get~results~from~STDOUT~-~UDF.txt
Title: Re: How to screen scrape?
Post by: kdmoyers on September 04, 2013, 12:53:11 PM
if you get desperate, there is this
http://www.uipath.com/features (http://www.uipath.com/features)
which claims to feature "Screen OCR scraping"

Doesn't look like fun, but if you're desperate...
Title: Re: How to screen scrape?
Post by: snowsnowsnow on September 04, 2013, 03:37:18 PM
Quote from: kdmoyers on September 04, 2013, 12:53:11 PM
if you get desperate, there is this
http://www.uipath.com/features (http://www.uipath.com/features)
which claims to feature "Screen OCR scraping"

Doesn't look like fun, but if you're desperate...

Actually, uiPath looks pretty darn cool.  Not exactly cheap, but pretty cool.  I couldn't quite tell whether there was a free (shareware) download available or not.

The company is in Romania, though.  That doesn't exactly inspire confidence...
Title: Re: How to screen scrape?
Post by: ChuckC on September 05, 2013, 02:39:30 PM
A question for the O.P.:

You state that the program is written in some form of COBOL, it runs on Windows but it doesn't do anything "GUI", and it has the appearance of a traditional "green screen" text application that you would normally encounter on a mainframe [via a 3270 terminal session].  This leads me to believe that it is a console mode application.

Please confirm whether or not the application is a console mode application.

If it is, I recall a series of discussions on the old webboard regarding using WinBatch to interact with a console session, including redirection of the console's input/output/error channels such that a script could directly receive output and directly provide input to the console mode program.  IIRC, samples of that code may have ended up in the tech support database and may well be applicable to this problem.
Title: Re: How to screen scrape?
Post by: Simon H. on September 12, 2013, 09:39:27 AM
Hello Tom,

I have done "screen scraping" on host applications, on both IBM M/F and Unix/Linux-based MicroFocus "green screens".
If you're using a 3270 terminal emulator, such as Attachmate's WRQ or alike, it's easy to do via OLE.

Please let us know more how the "green screens" are accommodated on your Windows PC.

-Simon H.