Jump to content

Textract (Screen OCR) UDF


seangriffin
 Share

Recommended Posts

This UDF provides text capturing support for applications and controls using Textract - an OCR Screen Text Capture Library for Windows 95/98/ME/NT/2000/XP.

This is an alternative to using the Microsoft Office Document Imaging library that comes with Office 2003 and higher.

At the time of writing this UDF, Textract is available on a free 40 day trial, with a purchase price of $219US for 1 copy.

REQUIREMENTS:

  • AutoIt3 3.2 or higher
  • Textract 2.9 or above
INSTALLATION:

To install the Textract trial:

LIST OF FUNCTIONS:

_TextractCapture($win_title, $win_text = "", $ctrl_id = "", $delimiter = "", $expand = 1, $scrolling = 1, $cleanup = 1)

_TextractFind($win_title, $win_text = "", $ctrl_id = "", $find_str = "", $partial = 1, $delimiter = "", $expand = 1, $scrolling = 1, $cleanup = 1)

DEMONSTRATION:

<Under Construction>

EXAMPLES:

_TextractCapture.au3_TextractFind.au3

DOWNLOAD:

Latest Version - v0.2 (12/02/09)

Textract.au3

Edited by seangriffin

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
Link to comment
Share on other sites

Are you afraid that you won't have a place to post your script that you are posting it even before it was ready ?

:) What better place to construct a post than in the post itself?

Not sure if I'll get a V0.1 done tonight. I'm gunna try though. :)

Cheers, Sean.

See my other UDFs:

Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax

See my other Tools:

Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia
Link to comment
Share on other sites

  • 3 weeks later...

It doesn't seem to work. Syntax of the call:

$gamwind = WinGetTitle("[ACTIVE]", "")

$newdata = _TextractCapture($gamwind, "", "", "", 1, 1, 1)

I get the following error message:

C:\Program Files\AutoIt3\Include\Textract.au3 (111) : ==> The requested action with this object has failed.:

$TextractOCX.ReadWindow(Number($hwnd))

$TextractOCX.ReadWindow(Number($hwnd))^ ERROR

Any thoughts?

Link to comment
Share on other sites

  • 10 months later...

It doesn't seem to work. Syntax of the call:

$gamwind = WinGetTitle("[ACTIVE]", "")

$newdata = _TextractCapture($gamwind, "", "", "", 1, 1, 1)

I get the following error message:

C:\Program Files\AutoIt3\Include\Textract.au3 (111) : ==> The requested action with this object has failed.:

$TextractOCX.ReadWindow(Number($hwnd))

$TextractOCX.ReadWindow(Number($hwnd))^ ERROR

Any thoughts?

Hi, i am getting the same error, how can i solve this? Thanks
Link to comment
Share on other sites

  • 1 year later...

Error Code:

>"x:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "xxx" /autoit3dir "x:\Program Files\AutoIt3" /UserParams    
+>15:07:28 Starting AutoIt3Wrapper v.2.0.1.24    Environment(Language:0415  Keyboard:00000415  OS:WIN_7/  CPU:X64 OS:X86)
>Running AU3Check (1.54.19.0)  from:D:\Program Files\AutoIt3
+>15:07:29 AU3Check ended.rc:0
>Running:(3.3.6.1):D:\Program Files\AutoIt3\autoit3.exe "xxx\123.au3"    
x:\Program Files\AutoIt3\Include\Textract.au3 (86) : ==> Variable used without being declared.:
$sel_index = _GUICtrlListBox_GetCurSel($hwnd)
$sel_index = _GUICtrlListBox_GetCurSel(^ ERROR
->15:07:32 AutoIT3.exe ended.rc:1
>Exit code: 1    Time: 6.842

My Code:

#include <Textract.au3>

$omg = _TextractCapture("java aplication")

msgbox(0, "", $omg)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...