On May 15, 2014, at 03:46, jgill <[email protected]> wrote:
> Thank you for your help, Christopher.
______________________________________________________________________

Hey Joe,

You're welcome.

> I couldn't get the Mail part of this script to work however, if I use the 
> clipboard contents (I am only using a selection fromf the email anyway) it 
> works fine.

Ah, I think you said raw text in your original query, so I made the wrong 
assumption.

No, that code won't work with selected-text (which is unfortunately not 
supported in Mail's AppleScript dictionary).

> Thanks for the tip about FastScripts too, I hadn't come across this one 
> before. 


I use FastScripts to run nearly all of my AppleScripts (unlike Apple's 
AppleScript menu it can handle per application keyboard shortcuts), although I 
do use BBEdit's own script menu for BBEdit-specific stuff.

For macros that require actions other than AppleScript I use Keyboard Maestro.

In a case like yours it would be easy to make KM do the copy-to-clipboard in 
Mail and then perform all subsequent other actions.

You could do it all in AppleScript though.

-------------------------------------------------------------------------------------------
tell application "System Events"
  set quit delay to 0
  tell process "Mail"
    set frontmost to true
    keystroke "c" using {command down}
  end tell
end tell
tell application "BBEdit"
  activate
  # Do your thing.
end tell
-------------------------------------------------------------------------------------------

As you can see you have a fair amount of choice.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to