• 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: getting the key window from another application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the key window from another application


  • Subject: Re: getting the key window from another application
  • From: Bob Ippolito <email@hidden>
  • Date: Fri, 6 May 2005 12:53:24 -0400

On May 6, 2005, at 8:20 AM, Ondra Cada wrote:

On 6.5.2005, at 6:00, Keith Alperin wrote:

I'm trying to interact with the first responder programatically. I'm most interested in manipulating text in in the focused text field,


Presumed the manipulations are simple and don't need to be too automatic, consider Services. That's the most clean solution for manipulation of the focused text and it would work *nearly* in any application; alas, it is also pretty limited in the flexibility.


Another possibility may be direct exploiting of the Input Management API. I am not expert in that field and cannot say precisely what it can and cannot do.


but there may be other cases where i will want to do something to whatever control is in focus.



Depending on the "something", unless I have overlooked something important, I guess forcing your bundle into the application might remain the only clean solution. Note that for obvious reasons it works only with nati... errr, sorry, with Cocoa applications. To do this for Carbon or even X11/Java whatever, you would have to hack.


There should be the excellent Mike Ferris' TextExtras package freely available on Web, which can be used to see how to do these things.

The Accessibility APIs may be able to do this, at least in Tiger. The PopupDictDaemon (press ctrl-cmd-d over any word in at text field) to read a word from the front window of another process.. no code injection or input manager abuse.


-bob

_______________________________________________
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


References: 
 >getting the key window from another application (From: Keith Alperin <email@hidden>)
 >Re: getting the key window from another application (From: Ondra Cada <email@hidden>)
 >Re: getting the key window from another application (From: Keith Alperin <email@hidden>)
 >Re: getting the key window from another application (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Menu item tag from menuref and item index?
  • Next by Date: Interface builder question.
  • Previous by thread: Re: getting the key window from another application
  • Next by thread: Binding on an NSTextField
  • Index(es):
    • Date
    • Thread