• 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: Re1: Mail scripting : How to select…
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re1: Mail scripting : How to select…


  • Subject: Re: Re1: Mail scripting : How to select…
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 12 May 2008 08:02:18 +0200

(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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Re1: Mail scripting : How to select…
      • From: awaw <email@hidden>
    • Re1: Mail scripting : How to select… continuation...
      • From: awaw <email@hidden>
References: 
 >Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Mail scripting : How to select… (From: Luther Fuller <email@hidden>)
 >Re: Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Mail scripting : How to select… (From: Axel Luttgens <email@hidden>)
 >Re1: Mail scripting : How to select… (From: awaw <email@hidden>)
 >Re: Re1: Mail scripting : How to select… (From: Axel Luttgens <email@hidden>)
 >Re: Re1: Mail scripting : How to select… (From: awaw <email@hidden>)

  • Prev by Date: Progress indicator for applescript process
  • Next by Date: Re: Mail scripting : How to select…
  • Previous by thread: Re: Re1: Mail scripting : How to select…
  • Next by thread: Re1: Mail scripting : How to select… continuation...
  • Index(es):
    • Date
    • Thread