Instead, after finding mention of a great program "Capture2Text", I built a very simple OCR system using this. Simply activate, and click-and-drag around the text to read, and the results will be left in your clipboard.
You can find a download for Capture2Text here: http://capture2text.sourceforge.net/#download
Note that the getSelectionCoords() function is code pulled straight from another post at https://autohotkey.com/board/topic/1018 ... nsresults/
Code: Select all
;hotkey to activate OCR
+!q::
getSelectionCoords(x_start, x_end, y_start, y_end)
RunWait, C:\Capture2Text.exe %x_start% %y_start% %x_end% %y_end%
MsgBox, In area :: x_start: %x_start% --> x_end: %x_end% , y_start: %y_start% --> y_end: %y_end%`n`nFound Text:`n`n%clipboard%
return
; creates a click-and-drag selection box to specify an area
getSelectionCoords(ByRef x_start, ByRef x_end, ByRef y_start, ByRef y_end) {
;Mask Screen
Gui, Color, FFFFFF
Gui +LastFound
WinSet, Transparent, 50
Gui, -Caption
Gui, +AlwaysOnTop
Gui, Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%,"AutoHotkeySnapshotApp"
;Drag Mouse
CoordMode, Mouse, Screen
CoordMode, Tooltip, Screen
WinGet, hw_frame_m,ID,"AutoHotkeySnapshotApp"
hdc_frame_m := DllCall( "GetDC", "uint", hw_frame_m)
KeyWait, LButton, D
MouseGetPos, scan_x_start, scan_y_start
Loop
{
Sleep, 10
KeyIsDown := GetKeyState("LButton")
if (KeyIsDown = 1)
{
MouseGetPos, scan_x, scan_y
DllCall( "gdi32.dll\Rectangle", "uint", hdc_frame_m, "int", 0,"int",0,"int", A_ScreenWidth,"int",A_ScreenWidth)
DllCall( "gdi32.dll\Rectangle", "uint", hdc_frame_m, "int", scan_x_start,"int",scan_y_start,"int", scan_x,"int",scan_y)
} else {
break
}
}
;KeyWait, LButton, U
MouseGetPos, scan_x_end, scan_y_end
Gui Destroy
if (scan_x_start < scan_x_end)
{
x_start := scan_x_start
x_end := scan_x_end
} else {
x_start := scan_x_end
x_end := scan_x_start
}
if (scan_y_start < scan_y_end)
{
y_start := scan_y_start
y_end := scan_y_end
} else {
y_start := scan_y_end
y_end := scan_y_start
}
}