473,748 Members | 4,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scraping display to obtain all on-screen text using OCR

I would like to perform a more classical type of "screen scraping"
than what most people now associate with this term. I only want to
find all the text on the current screen, and obtain associated screen
coordinates. This probably must be done using OCR.

This need only run on Windows. A fairly-pure Python solution would be
ideal because most of the software which would use this functionality
is also written in Python.

The ideal output would consist of a list of tuples, where each tuple
consists of ("string found", a, b, c, d) where the latter four
constitute a bounding rectangle associated with the text that was
found. It might also be handy to throw in some font information.

Thanks in advance for any pointers.

Jonathan
Jul 18 '05 #1
2 4355
ja**********@ya hoo.com (Jonathan Epstein) writes:
I would like to perform a more classical type of "screen scraping"
than what most people now associate with this term. I only want to
find all the text on the current screen, and obtain associated screen
coordinates. This probably must be done using OCR.
This need only run on Windows.


Usually you do that by intercepting the Windows text painting events,
rather than anything as horrendous as OCR'ing.
Jul 18 '05 #2
Jonathan Epstein wrote:
I would like to perform a more classical type of "screen scraping"
than what most people now associate with this term. I only want to
find all the text on the current screen, and obtain associated screen
coordinates. This probably must be done using OCR.

This need only run on Windows.
You can use the accessibility APIs to get that information. Start at
http://weblogs.asp.net/oldnewthing/a...23/118893.aspx
A fairly-pure Python solution would be
ideal because most of the software which would use this functionality
is also written in Python.


You may be able to do it using win32all, ctypes or worst case a
SWIG wrapper.

Roger
Jul 18 '05 #3

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

Similar topics

1
3566
by: Tristan Miller | last post by:
Greetings. I am trying to write a function which toggles the display of a certain class of <div> elements in an HTML page. The CSS file initially sets some classes to "display: none", and others to "display: block". The problem I am encountering is that when the JavaScript interpreter starts up initially, all style.displays are null. Thus the following code is not effective: function toggleAll(itemname) {
1
1912
by: mustafa | last post by:
anyone know some good reliable html scraping (with python) tutorials. i have looked around and found a few. one uses urllib2 and beautifull soap modules for scraping and parsing http://www.dalkescientific.com/writings/diary/archive/2005/04/21/screen_scraping.html and the other uyses mechanize, clientcookie ,clientform. http://sig.levillage.org/?p=588 which one should i go with. i am looking for and html scraping solution
2
1333
by: Selden McCabe | last post by:
I've been working on a web scraping program, and have the basics down. But I don't understand the parameters. Normally, you go to a URL (say a reverse yellow pages directory), and enter some parameters (like area code, phone number, etc.) and POST this back to the web. Then you parse the response, looking for the data you need. Ofen I see examples where the data you post contains something like "AreaCode=503&Number=5551212&x=1&y=2"
4
1468
by: Eric A. Johnson | last post by:
For the following code: ' return String representation of CTriangleShape Public Overrides Function ToString() As String ' use MyBase reference to return CShape String Return MyBase.ToString & ";" & vbCrLf & _
3
2882
by: Sanjay Arora | last post by:
We are looking to select the language & toolset more suitable for a project that requires getting data from several web-sites in real- time....html parsing/scraping. It would require full emulation of the browser, including handling cookies, automated logins & following multiple web-link paths. Multiple threading would be a plus but not requirement. Some solutions were suggested: Perl:
1
1847
by: Essial | last post by:
I have written a fairly simple application in C# that loops through the forms, and all the children of all the forms, and have generated a tree view with all the properties. All this works good and well. But now I have a new problem. Some websites have javascript menus (which can be embedded or seperate). I was wondering if there was a way to scrape javascript menus (at least in a way that you can obtain the urls and/or actions they...
9
2272
by: perls | last post by:
"Newbie needs help" Hi all, I had a programmer do a site scraping script for me.. the aim was to scrape data from 5 different sites and upload directly into my website databse. I started to study the five .pl files and found that there is only small changes in the files e.g. ( the url from the site to be scraped changes for obvious reasons etc. ) There is also a few other lines of code which I dont understand. I would like to be able to...
4
3270
by: ssg31415926 | last post by:
I'm familiar with the idea of page-scraping - getting data from websites where there's no nice feed to use. Is there a name for the opposite i.e. when your program simulates a human inputting data to a site? I need to do this and I don't know what to search for. So far, my searches have been fruitless. The supplier of our IPT system won't support direct updates to their directory or config database. I'm trying to implement an...
2
1986
by: shannonw | last post by:
Hi, I'm looking for a piece of software or coding that will let me post a form to another URL, accept the response, search it for a specific "success" string and then let me continue processing the rest of my program. I want to accept queries on behalf of my supplier, forward it to them behind
1
2147
by: dearprasan | last post by:
I have a custom browser application built in C#. I want to access the Internet Explorer's Cache to display contents on this custom browser application. For example: If the user types "www.msn.com" in my custom browser, I look into the local cache folder for "www.msn.com" and display its contents. A not-so-good idea to achieve this is to iterate through the 'Temporary Internet Files' folder contents, one by one, until I find the correct...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.