473,378 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

how to screen scrape from a windows text box

I want to write or obtain C++ code that will scrape text from a dialog
box within a poker client, and then record that text somewhere else.

What do I do? Thanks.

May 29 '07 #1
3 5137
Well, the first thing to do is post to the correct newsgroup. This is the C#
language group. For C++ code, you need the C++ group.

Aside from that, screen scraping is done pretty much the same way regardless
of whether from a windows app or a web app.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"WF****@gmail.com" wrote:
I want to write or obtain C++ code that will scrape text from a dialog
box within a poker client, and then record that text somewhere else.

What do I do? Thanks.

May 29 '07 #2
What do you mean by "scraping text"? Getting all dialog's child control's
captions?

Look at Win32 GetWindow() and GetWindowText() functions.

You'll need to call GetWindow(), starting with the parent dialog's HWND,
recursively. For each obtained child window's HWND, call GetWindowText().
That'll do it...

TCHAR tchWindowText[5000];

void SaveText( HWND hwndParent )
{
// Get the current window's caption.
GetWindowText( hwndParent, tchWindowText, 5000 ); // Save this text
wherever.

// Get all the child windows
HWND hwndChild;
while( ( hwndChild = GetWindow( hwndParent, GW_CHILD ) ) != NULL )
SaveText( hwndChild );

// Now process all siblings of this window.
HWND hwndSibling;
while( ( hwndSibling = GetWindow( hwndParent, GW_HWNDNEXT ) ) != NULL )
SaveText( hwndSibling );
}

// Call this with the dialog's HWND.
SaveText( hwndDialog );

<WF****@gmail.comwrote in message
news:11**********************@m36g2000hse.googlegr oups.com...
>I want to write or obtain C++ code that will scrape text from a dialog
box within a poker client, and then record that text somewhere else.

What do I do? Thanks.

May 29 '07 #3
Peter Bromberg [C# MVP] wrote:
Well, the first thing to do is post to the correct newsgroup. This is the C#
language group. For C++ code, you need the C++ group.
Good advice.
Aside from that, screen scraping is done pretty much the same way regardless
of whether from a windows app or a web app.
Web screen scraping consist of sending a HTTP request and pulling
the right information out of the returned HTML - often done using
regex.

I would expect screen scraping a win form to be very different.

Arne
Jun 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason Steeves | last post by:
I have one .aspx form that my users fill out and this then takes that information and populates a second .aspx form via session variables. I need to screen scrape the second .aspx form and e-mail...
2
by: Me | last post by:
I am dealing with a poorly written windows application that does not contain an API. I would like to use C# to run a predetermied set of steps in the application and scrape the resulting data...
2
by: Rob Lauer | last post by:
I have written two completely separate web applications that cannot talk directly to one another (applications "A" and "B"). Application "A" has a form that takes some input (radio buttons,...
0
by: Steve | last post by:
I am working on an application to screen scrape information from a web page. I have the base code working but the problem is I have to login before I can get the info I need. The page is hosted on...
7
by: Swanand Mokashi | last post by:
Hi all -- I would like to create an application(call it Application "A") that I would like to mimic exactly as a form on a foreign system (Application "F"). Application "F" is on the web (so...
7
by: ljr2600 | last post by:
Hello, I'm very new to python and still familiarizing myself with the language, sorry if the post seems moronic or simple. For a side project I'm working on I need to be able to scrape a...
3
by: WFDGW2 | last post by:
I want to write or obtain C++ code that will scrape text from a dialog box within a poker client, and then record that text somewhere else. What do I do? Thanks.
0
by: itfetish | last post by:
We have a web parts intranet at our office here I have been working on. I have been trying to create a way of getting our OCE TDS 600 plotter queue to be a web part on the page, seeing as their...
1
by: newdev | last post by:
Hi All, Can somebody maybe please help me? - how do i screen scrape data from a dos application / window to .net application by using c#? - how do i screen scrape data from a dos application /...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.