Re: get selected text of message in Mail?
Re: get selected text of message in Mail?
- Subject: Re: get selected text of message in Mail?
- From: Martin Orpen <email@hidden>
- Date: Fri, 2 Sep 2005 12:49:59 +0100
On 2 Sep 2005, at 12:00, Gary (Lists) wrote:
"kai" wrote:
On 2 Sep 2005, at 10:03, Gary (Lists) wrote:
Well, I liked the "preserve the original clipboard" politeness in
Kai's
script, and obviously Martin's is shorter and speedy.
- and doesn't touch the clipboard. :-)
Yes, yes. I meant that I wanted it on the clipboard, and that I'd
also like
to preserve it, as you did. Hence the marriage.
I've noticed something limiting about "AXSelectedText" - it can't
handle multiple selections.
So, if you are in the habit of command-clicking over multiple
selections of text you'll need to use Kai's script.
Using AXSelectedText on continuous selections appears to work in most
apps:
tell application "System Events"
tell process "Preview"
get value of attribute "AXSelectedText" of static text 1 of
scroll area 1 of window 1
--alternatively, the whole document text
--get value of static text 1 of scroll area 1 of window 1
end tell
end tell
Which, for information purposes only - and just like using the
Services menu - bypasses PDF copy protection.
--
Martin Orpen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden