• 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 selected text of message in Mail?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: get selected text of message in Mail? (From: "Gary (Lists)" <email@hidden>)

  • Prev by Date: Re: get selected text of message in Mail?
  • Next by Date: Re: noob
  • Previous by thread: Re: get selected text of message in Mail?
  • Next by thread: Re: get selected text of message in Mail?
  • Index(es):
    • Date
    • Thread