• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get current caret position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Get current caret position (From: eveningnick eveningnick <email@hidden>)

  • Prev by Date: Re: Core Data: During Migration, should use Primitive Accessors only?
  • Next by Date: Re: Garbage Collection, Standard Out, NSTask
  • Previous by thread: Re: Get current caret position
  • Next by thread: Garbage Collection, Standard Out, NSTask
  • Index(es):
    • Date
    • Thread