• 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: Copy email address from clipboard to outgoing Mail message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy email address from clipboard to outgoing Mail message


  • Subject: Re: Copy email address from clipboard to outgoing Mail message
  • From: Deivy Petrescu via AppleScript-Users <email@hidden>
  • Date: Wed, 13 May 2020 20:33:52 -0400


> On May 13, 2020, at 20:26 , Shane Stanley via AppleScript-Users
> <email@hidden> wrote:
>
> On 14 May 2020, at 10:05 am, Deivy Petrescu via AppleScript-Users
> <email@hidden> wrote:
>>
>> tell application "Mail"
>>              set newMessage to make new outgoing message with properties
>> {subject:"Blah, blah, blah",  content:"La-de-dah”}
>>              tell newMessage to make new to recipient with properties
>> {address:the clipboard}
>> end tell
>
> Or:
>
> set customer to the clipboard
> tell application "Mail"
>       set newMessage to make new outgoing message with properties
> {subject:"Blah, blah, blah", content:"La-de-dah"}
>       tell newMessage to make new to recipient with properties
> {address:customer}
> end tell
>
> Scripting addition commands should generally be kept outside application tell
> blocks.
>
>
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
>
> --


Shane, I don’t think it is an issue in this case.
Apparently the clipboard is accessed by any apps.

I actually checked and you do not get the standard error one gets when using
scripting addition commands inside application tell blocks.
For instance, the script above does not error but this one

tell application "Mail"
                set newMessage to make new outgoing message with properties
{subject:"Blah, blah, blah",  content:"La-de-dah”}
                display dialog the clipboard
                tell newMessage to make new to recipient with properties
{address:the clipboard}
end tell


does.


Deivy Petrescu
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Copy email address from clipboard to outgoing Mail message (From: Mike Matthews via AppleScript-Users <email@hidden>)
 >Re: Copy email address from clipboard to outgoing Mail message (From: Deivy Petrescu via AppleScript-Users <email@hidden>)
 >Re: Copy email address from clipboard to outgoing Mail message (From: Shane Stanley via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Copy email address from clipboard to outgoing Mail message
  • Next by Date: Re: Copy email address from clipboard to outgoing Mail message
  • Previous by thread: Re: Copy email address from clipboard to outgoing Mail message
  • Next by thread: Re: Copy email address from clipboard to outgoing Mail message
  • Index(es):
    • Date
    • Thread