On Feb 29, 2008, at 03:27, Ryan Homer wrote:

I've read this post (http://lists.apple.com/archives/accessibility- dev/2006/Aug/msg00007.html) about using the accessibility options to read the text under the cursor. However, this requires that the user enable access for assistive devices in System Preferences. The application must therefore check for that. It also seems quite complicated; I don't want to have to deal with glyphs and the like - I only want the text under the cursor, full stop.

The Dictionary application is able to read a word under the cursor without enabling access for assistive devices.

Does anyone therefore know of an alternative way to do this?

You can write a service which let the user to select some text and pass it to the service. This will be easy to develop and support, but not useful as the built-in dictionary app.

More risky alternative is an input manager, which let poke into any Cocoa app data you like without enabling accessibility. However, input managers are deprecated and may stop working at some point in the future. Writing input manager is easy, but not well documented.

For input manager examples, see:

- http://www.lorax.com/FreeStuff/TextExtras.html - The original input manager example code. Show how to watch the first responder which you can use to access the text bellow the cursor. - http://www.culater.net/software/SIMBL/SIMBL.php - framework for loading input managers

There is related discussion here: <http://switchersblog.com/ 2007/08/31/the-end-of-the-input-manager-and-pimping-mac-os-x.html>

Another more evil alternative is APE <http://www.unsanity.org/> - it will let you access any app data.


Best Regards,

Nir Soffer

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to