Re: Get current caret position
Re: Get current caret position
- Subject: Re: Get current caret position
- From: Kyle Sluder <email@hidden>
- Date: Tue, 16 Nov 2010 09:51:16 -0800
On Tue, Nov 16, 2010 at 4:26 AM, eveningnick eveningnick
<email@hidden> wrote:
> Hello
> I a wondering, if it is possible to get the current screen position of
> a text cursor (text caret) using Cocoa? It is possible to do that in
> Windows system (GetCaretPos), maybe Mac allows some similar
> functionality?
You're enumerating Word's windows and calling GetCaretPos on its text
view? Mac OS X does not let you do that. The closest you can get is
through the Accessibility framework: apps expose an object hierarchy
to the accessibility system that other apps can use to manipulate the
user interface. However, this is optional both from the app
developer's point of view as well as that of the user (the user needs
to turn on access for assistive devices).
IIRC, Word 2011 re-instated VBA support. Perhaps you can use this
interface to accomplish your goals?
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden