1.1.
mouse Take word The realization principle of screen-taking word technology
1.2. need to use WINAPI( not recommended, traditional method , "
requires a global mouse Hook
and then in The handle (windowfrompoint) of the corresponding window is found in the hook event according to the mouse position.
Retrieve text again (GetWindowText)
Why not recommend this method, very simple, cross-system is very poor, do not say xp Win7 Vista , tablet,linux,mac machine can not be universal. cannot be compatible with future location GUI systems.
Also , it is not possible to use a system that uses a self-drawing UI interface.
There are a lot of apps that are appsunder Android, running on a pc with simulators , and not capturing the text of such apps .
also less documentation, more difficult to achieve, more trouble.
1.3.
screenshot +OCR recommended
advantages, very obvious, cross-system cross- GUI system. Self-portrait or win API or Linux,mac interface, android app interface, All clean sweep.
1.4.
The specific process is probably as follows
get mouse coordinates, this is easy to get to. Even js can be easily obtained.
Mouse selection
Second, intercept the coordinate range text. , because the mouse is selected, the text is anti-white, it is easy to get the text area.
OCR gets text.
This will get the text ...
As for how to deal with the text, it is generally shown a translation box near the text or mouse.
related to Guigui system best h5 technology. You can use the java c# do a html parser (general use browser control can) shell, inside call h5 can be. You can use html css
Resources
screen take word technology implementation principle and key source - Bole Mutual Encouragement - Blog Park . html
author:: Nickname :Old Wow's claws( Full Name::AttilaxAkbar Al Rapanui Attilaksachanui)
Kanji Name: Etila ( Ayron) , email:[email protected]
reprint Please indicate source: http://www.cnblogs.com/attilax/
Atiend
1.1. Mouse take Word screen to take word technology realization principle