Re: passing a list to FMPro from Mail
Re: passing a list to FMPro from Mail
- Subject: Re: passing a list to FMPro from Mail
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 08 Apr 2015 19:44:16 +0200
Le 08/04/2015 à 19:34, Christopher Stone < email@hidden> a écrit :
On Apr 04, 2015, at 20:13, John Mitchell < email@hidden> wrote: I have an applescript which captures a list of email recipients, and then saves it to a global variable in FMPro, all defined as an Apl script in a FMPro script.
______________________________________________________________________
Hey John,
I don't have FMP to test with, so I have no idea where that failure is occurring, but...
tell application "Mail" set theMessages to selection set theEmail to last item of theMessages tell theEmail set personList to (name of recipients of theEmail) set personList to personList & (name of to recipients of theEmail) set personList to personList & (name of cc recipients of theEmail) end tell end tell
You're already telling theEmail, so the underlined portions are unnecessary.
Also - recipients includes to recipients, cc recipients, and bcc recipients - so you have quite a bit of redundancy here.
And the result is a list containing every name twice.
tell application "Mail" set theMessages to selection set theEmail to last item of theMessages tell theEmail set personList to name of recipients end tell end tell
is doing the job flawlessly.
Yvan KOENIG (VALLAURIS, France) mercredi 8 avril 2015 19:43:51
|
_______________________________________________
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