获取文本在鼠标光标在mac osx豹/雪豹 [英] Get text under mouse cursor in mac osx leopard/snow leopard

查看:93
本文介绍了获取文本在鼠标光标在mac osx豹/雪豹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何想法,让鼠标光标下的文本?

is there any idea for getting the text under the mouse cursor?

我试图建立一个字典应用程序,

I'm trying to build a dictionary app, that pops up a panel of translates when mouse hangs over a word.

我看了一下accessiblity apis,它只能找到当前的ui元素,但不能找到当前的词...

I took a look at the accessiblity apis, and it only can find the current ui element, but not the current word...

我的最后一个选择将经常做屏幕截图,并做ocr ...这将是cpu消费,我不喜欢这..

my last choice will be makeing screenshots frequently, and doing ocr... that'll be cpu consuming, I don't like that..

有什么想法吗?提前感谢!

any idea for this? thanks in advance!

推荐答案

虽然可以通过支持的机制( Spell Catcher X ),这是很难得到正确的广泛的应用程序。请查看直接正确

While it is possible to do this via supported mechanisms (Spell Catcher X does), it's very hard to get right across a wide range of applications. Take a look at the page on Direct Correct—there are 3 mechanisms supported, none of which work perfectly, etc. etc.

苹果词典应用程序已经支持这种弹出字典查找,它的工作原理是:许多应用。您可以创建自定义词典它,如果你只需要逐字翻译(例如,苹果包括日本 - 英语字典)。

Apple's Dictionary app already supports this kind of pop-up dictionary lookup, which works in many applications. You can create custom dictionaries for it, if you just need word-by-word translation (for example, Apple includes a Japanese-English dictionary). You can reorder reference sources in Dictionary's Preferences to put your dictionary first, if you want.

否则,我建议使用OCR路由。您不需要经常截取屏幕截图,只是当用户请求翻译时,对吗?

Otherwise, I'd suggest the OCR route. You don't need to take screenshots frequently, just when the user requests translation, right?

这篇关于获取文本在鼠标光标在mac osx豹/雪豹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆