Re: Re1: Mail scripting : How to select…
Re: Re1: Mail scripting : How to select…
- Subject: Re: Re1: Mail scripting : How to select…
- From: awaw <email@hidden>
- Date: Mon, 12 May 2008 10:43:04 +0200
Thanks to Axel luttgens for that complete response.
I think I have understood this time…
I was searching a ghost!…
For my first experience with Applescript I have learned very much.
Thanks also to all others contributors.
Gérard
Le 12 mai 08 à 08:02, Axel Luttgens a écrit :
(sorry, sent the message yesterday without changing the "To:"
field...)
Le 10 mai 08 à 09:49, awaw a écrit :
[...]
What is the real name for "sur mon Mac"? I haven't tried "on my Mac"…
The "sur mon Mac" is a GUI thing (see my previous message), without
direct counterpart at AppleScript's level.
Let's take the case of trashed messages again.
According to Mail's dictionary, the application has following
property:
application n [inh. application; see also Standard Suite] : Mail's
top level
scripting object.
[...]
PROPERTIES
[...]
trash mailbox (mailbox, r/o) : The top level Trash mailbox
[...]
But a message viewer has a similary named property too:
message viewer n [inh. item] : Represents the object responsible
for managing
a viewer window
[...]
PROPERTIES
[...]
trash mailbox (mailbox, r/o) : The top level Trash mailbox
[...]
Finally, still according to the dictionary, the application may have
mailboxes as elements.
So, let's try those various things.
Mail's property first:
tell application "Mail" to get mailboxes of thrash mailbox
--> a list of mailboxes:
-- one mailbox per account, such as:
-- mailbox "Deleted Messages" of account "Gérard" of application
"Mail"
-- a mailbox said to directly belong to Mail itself:
-- mailbox "Deleted Messages" of application "Mail"
A message viewer's property now:
tell application "Mail" to get mailboxes of thrash mailbox
--> same as above
Finally, using the trick from the other day:
tell application "Mail" to get mailboxes whose name of its
container is missing value
--> various local top-level mailboxes with, among them:
-- mailbox "Deleted Messages" of application "Mail"
So, if you ask for:
messages of mailbox "Deleted Messages" of application "Mail"
you should find that those messages are the ones appearing under
"Corbeille/sur mon Mac" in the GUI.
And clearly, there is no single piece of code making use of "sur mon
Mac" (or "on my Macintosh", or...).
One could just say that everything displayed under "sur mon Mac" is
not account-related, but is local.
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to 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