Re: How to get selected text in current application ?
Re: How to get selected text in current application ?
- Subject: Re: How to get selected text in current application ?
- From: "John C. Randolph" <email@hidden>
- Date: Wed, 13 Jun 2001 11:11:44 -0700
On Wednesday, June 13, 2001, at 09:33 AM, Thierry Bucco wrote:
Hi,
Is there a way to get selected text in the current application and
perform action with it.
Yes.
What you'll probably want to do is walk through the responder chain
until you find an object that responds to -selectedRange, and then get
the selected text from it with -RTFFromRange: (if you want the rich text
attributes) or -string (if you just want the characters.)
If the text is not selected, you can use -setSelectedRange: to select it.
-jcr
(If this message looks like it has an attachment, your mail reader is
brain-dead.)
begin