Re: Mail rules (was: How go get mailbox path top down instead of bottom up?)
Re: Mail rules (was: How go get mailbox path top down instead of bottom up?)
- Subject: Re: Mail rules (was: How go get mailbox path top down instead of bottom up?)
- From: Axel Luttgens <email@hidden>
- Date: Fri, 23 Dec 2011 09:35:12 +0100
Le 22 déc. 2011 à 03:46, Robert Nicholson a écrit :
> Well knowing that you can do this
>
>> get mailboxes whose name is MBoxName
>
> makes it a much easier problem.
Hello Robert,
To be useable, such filter reference forms (or "whose clauses") have to be implemented by the target application, Mail in this case. And, depending on the application, that implementation may be more or less extensive; Mail is rather versatile from that point of view.
> now does anybody know if the dictionary allows you to point existing Mail rules that reference 2011 mailboxes to 2012 mailboxes?
There should be a way, but it depends on what you mean by "rules that reference 2011 mailboxes".
Mail rules are available as application elements, and a rule has "rule conditions" as elements. So, assuming you have at least one rule, you may get an idea by running this one in AppleScript Editor
tell application "Mail"
properties of first rule
properties of rule conditions of first rule
end tell
and look at what gets written to the log (as well as at what tells Mail's dictionary, of course).
If you are interested in all those rules moving messages to 2011 mailboxes, this seems to do the job:
tell application "Mail"
rules whose name of move message is "2011"
end tell
HTH,
Axel
_______________________________________________
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