Re: Text Capture in Cocoa
Re: Text Capture in Cocoa
- Subject: Re: Text Capture in Cocoa
- From: John Stiles <email@hidden>
- Date: Fri, 16 Jun 2006 10:48:34 -0700
Does the Dictionary plug-in work with images??
I'm not sure how you could handle rasterized images unless you
implement an OCR solution :)
On Jun 16, 2006, at 9:29 AM, Yaogang Lian wrote:
Thanks for reply, Bill.
The parameterized text attributes still won't let me reproduce the
exact
layout of a textView, when there are images inserted. Hovering the
mouse
over a word in the textView only returns info about the texts
inside, but
not about the images, unless you put your mouse over the image.
So from the info collected by Accessibility APIs, I still can't
calculate which
word my mouse is hovering on.
It seems that in OS9, an application called FKEY solved this
problem by
intercepting QuickDraw APIs. Is it possible to do it in OS X? Is
there anyway
to intercept the drawing APIs in Quartz and get the output text in
that way?
Thanks again.
Yaogang
On Jun 16, 2006, at 5:05 AM, Bill Cheeseman wrote:
on 2006-06-15 8:15 PM, Yaogang Lian at email@hidden wrote:
The accessibility API is quite useful for grabbing info from UI
elements, but it seems to
be unable to grab a single word. For example, when I point the mouse
to a word
in a web page, the accessibility API returns either all the texts in
a paragraph or selected
texts. I hope to be able to grab a single word without actually
selecting it. This seems to
be a more tricky task.
Using the accessibility API's "parameterized" text attributes, you
should be
able to get the text under the mouse and then parse it down to the
word
under the mouse.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden