Grabbing selected text in any app
Grabbing selected text in any app
- Subject: Grabbing selected text in any app
- From: Duncan Campbell <email@hidden>
- Date: Wed, 26 Sep 2007 13:41:15 +1000
Hi Folks,
I'm writing a little helper app for my mac workmates to enable them
to work better with windows paths - specifically to map windows
network drive names to the equivalent mac mounts (so for example x:
\foobar becomes /Volumes/DriveName/foobar). These links come in the
form of links in emails, word documents, msn conversations etc. etc.
The approach I am taking is for them to be able to highlight the
windows sharename, press a hot-key combination and then have finder
open in the correct location using the mac equivalent.
I have this all working great - except right now I am getting them to
copy the selected text to the pasteboard and then I read it from there.
My question is - is there any easy way for me to just grab the
selected text in any application and work with it (rather than having
to first copy it)? I've done a bit of searching and there's things
like Text Extras etc. but I really don't want to make them install an
frameworks/updates extensions etc. Additionally, I want this to work
in all apps - that includes word, entourage etc - which aren't
(afaik) using anything that's NSText-based. I did find a post on
cocoabuilder asking the same question with a response suggesting to
"Walk the responder tree" - but there was no sample code of how to do
this? Is this even something that's possible?
Cheers for any direction,
D.
_______________________________________________
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