automation - Get the word under the mouse cursor in Windows -
greetings everyone,
a friend , discussing possibility of new project: translation program pop translation whenever hover on word in control, static, non-editable ones. know there many browser plugins sort of thing on webpages; we're thinking how system-wide (on windows).
of course, key difficulty figuring out word user hovering over. i'm aware of msaa , automation, far can tell, things allow entire contents of control, not specific word mouse over.
i stumbled upon (proprietary) application pretty want do: http://www.gettranslateit.com/
somehow able exact word user hovering on in application (it seems have trouble in few apps, notably windows explorer). grabs text out of custom-drawn controls, somehow. @ first thought must using ocr. when shrink font far down text becomes unreadable blob, can still recognize words perfectly. (and yet, doesn't recognize if change font wingdings. maybe that's design?)
any ideas how it's achieving seemingly impossible task?
edit: doesn't work wingdings, work other nonsense fonts, i've confirmed can't ocr.
you capture gdi calls output text display, , figure out word's bounding box cursor falls in.
Comments
Post a Comment