Running an Applescript in Mail
Running an Applescript in Mail
- Subject: Running an Applescript in Mail
- From: John Mitchell <email@hidden>
- Date: Tue, 7 Nov 2017 13:11:08 +1100
Chris
as usual such good advice
tks and will experiment…
> Date: Mon, 6 Nov 2017 03:56:21 -0600
> From: Christopher Stone <email@hidden>
> To: Applescript Users List <email@hidden>
> Subject: Re: Running an Applescript in Mail
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> On 11/06/2017, at 01:30, John Mitchell <email@hidden
> <mailto:email@hidden>> wrote:
>> I would like a script as part of the Mail interface, by click on a Mailbox
>> name to run a script in Filemaker to create a folder of the same name.
>>
>> I assumed I could do it using Rules but I believe that isn’t possible.
>
>
> Hey John,
>
> Mail's AppleScript via rule function has been problematic for a long time.
>
> Selecting one or more regular mailboxes is simple enough.
>
> ------------------------------------------------------------------------------
> # Select Top Level Mailbox:
> ------------------------------------------------------------------------------
>
> tell application "Mail"
> set mailboxReference to mailbox "ACTION" of application "Mail"
>
> tell (some message viewer whose index is 1)
> set selected mailboxes to {mailboxReference}
> end tell
>
> end tell
>
> ------------------------------------------------------------------------------
> # Select Second Level Mailbox:
> ------------------------------------------------------------------------------
>
> tell application "Mail"
> set mailboxReference to mailbox "Pending/ccs_From" of application "Mail"
>
> tell (some message viewer whose index is 1)
> set selected mailboxes to {mailboxReference}
> end tell
>
> end tell
>
> ------------------------------------------------------------------------------
> # Get Selected Mailbox:
> ------------------------------------------------------------------------------
>
> tell application "Mail"
> set mailboxReference to mailbox "Pending/ccs_From" of application "Mail"
>
> tell (some message viewer whose index is 1)
> set selected mailboxes to {mailboxReference}
> end tell
>
> end tell
>
regards
John
CQR Pty Ltd
1005/2 Dind Street, Milsons Point, NSW 2061 Australia
ABN: 45 001 785 191 • NSW ARBN: 3605
Email: email@hidden • Mob: +61 410 318 131
Skype: jrmitchell
Tel: +61 (2) 9922 3785
_______________________________________________
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