473,327 Members | 2,069 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,327 software developers and data experts.

screen scraping question


Howdy - I'm trying to get some info from another window. In the past, I have
succesfully used code like the following to get the text from a control on
another window (when the class type is RICHEDIT). However, I have
encountered a window control whose class is "AfxWnd42s", and using
WM_SENDMESSAGE ( ... GETTEXT...) is NOT working. I have verified w/ Spy++
"Find Window" tool and the debugger that the window handle I am obtaining is
correct.

Can someone tell me another method so that I can get the text from an
"AfxWnd42s" control? Please let me know - thanks!
My email: ke************@hotmail.com_removeAllofThisTrailingText
NoSpAm****removeAllofThisTrailingText
Code snippet that works for "RICHEDIT", but not for "AfxWnd42s":

IntPtr the_one = Win32.FindWindowEx(WinHnd, 0, "AfxWnd42s",
null);
StringBuilder formDetails = new StringBuilder( 65000 );
Int32 result1 = Win32.SendMessage(the_one, Win32.WM_GETTEXT,
65000, formDetails);
Nov 16 '05 #1
1 2472
Unless the other window supports the WM_GETTEXT method, there's no
straightforward way of getting the text of any arbitrary control.

If the other window belongs to a different process, then, you're talking
about Inter Process Communication. The Windows Shell devs put in a lot of
code behind the WM_GETTEXT message for the text controls to be able to pass
data between processes. The same may not be true for all controls.

-vJ

"Kevin Dombroski" <ke*************@comcast.net> wrote in message
news:pLtyc.11728$2i5.11165@attbi_s52...

Howdy - I'm trying to get some info from another window. In the past, I
have
succesfully used code like the following to get the text from a control on
another window (when the class type is RICHEDIT). However, I have
encountered a window control whose class is "AfxWnd42s", and using
WM_SENDMESSAGE ( ... GETTEXT...) is NOT working. I have verified w/ Spy++
"Find Window" tool and the debugger that the window handle I am obtaining
is
correct.

Can someone tell me another method so that I can get the text from an
"AfxWnd42s" control? Please let me know - thanks!
My email: ke************@hotmail.com_removeAllofThisTrailingText
NoSpAm****removeAllofThisTrailingText
Code snippet that works for "RICHEDIT", but not for "AfxWnd42s":

IntPtr the_one = Win32.FindWindowEx(WinHnd, 0, "AfxWnd42s",
null);
StringBuilder formDetails = new StringBuilder( 65000 );
Int32 result1 = Win32.SendMessage(the_one, Win32.WM_GETTEXT,
65000, formDetails);

Nov 16 '05 #2

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

Similar topics

4
by: Roland Hall | last post by:
Am I correct in assuming screen scraping is just the response text sent to the browser? If so, would that mean that this could not be screen scraped? function moi() { var tag = '<a href='; var...
3
by: Jim Giblin | last post by:
I need to scrape specific information from another website, specifically the prices of precious metals from several different vendors. While I will credit the vendors as the data source, I do not...
1
by: niv | last post by:
Hello, I would like to screen scrape certain parts of a webpage...how can I do this in asp.net For instance.... a stockticker thats embeded on a webpage.. I dont want the entire page.. I...
4
by: rachel | last post by:
Hello, I am currently contracted out by a real estate agent. He has a page that he has created himself that has a list of homes.. their images and data in html format. He wants me to take...
2
by: Victor | last post by:
I'm doing screen scraping by retrieving data from one site and entering into another site. I have a problem with logging into the site. User name and password field contain 'name' property, and...
4
by: different.engine | last post by:
Folks: I am screen scraping a large volume of data from Yahoo Finance each evening, and parsing with Beautiful Soup. I was wondering if anyone could give me some pointers on how to make it...
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.
4
by: jeffbg123 | last post by:
Hey, I am trying to make a bot for a flash game using python. However I am having some trouble with a screen scraping strategy. Is there an accepted way to compare a full screenshot with the...
3
by: bruce | last post by:
Hi... got a short test app that i'm playing with. the goal is to get data off the page in question. basically, i should be able to get a list of "tr" nodes, and then to iterate/parse them....
1
by: bruce | last post by:
Hi Paul... Thanks for the reply. Came to the same conclusion a few minutes before I saw your email. Another question: tr=d.xpath(foo) gets me an array of nodes.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.