• 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: Mail Search surrogate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail Search surrogate


  • Subject: Re: Mail Search surrogate
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 09 Apr 2009 19:22:40 -0500

On Apr 9, 2009, at 6:44 PM, Gil Dawson wrote:

Evidently, some mailboxes belong to an account, e.g.:

 mailbox "INBOX" of account "Dominant" of application "Mail"
 mailbox "Drafts" of account "Dominant" of application "Mail"
 mailbox "Sent Messages" of account "Dominant" of application "Mail"
 mailbox "Deleted Messages" of account "Dominant" of application "Mail"
 mailbox "INBOX" of account "Enkidu" of application "Mail"
 mailbox "Drafts" of account "Enkidu" of application "Mail"
 mailbox "Deleted Messages" of account "Enkidu" of application "Mail"

These are not included in "mailboxes".  I.e., "set MainBoxes to (mailboxes as list)" does not retrieve any of these.  That's why the code above has to fetch these separately.

Some mailboxes are missing (e.g., "Sent Messages" of account "Enkidu"), I hope because they are empty.

Here is the start of my handler ...

on scanMailboxes()
tell application "Mail"
set folderList to {}
set frontViewer to (some message viewer whose index is 1)
set allMailboxes to mailboxes as list -- does not need open message viewer
repeat with mbox in allMailboxes
set selected mailboxes of frontViewer to {mbox} -- this may need an open message viewer

The important line is the last one. This allows you to see the mailbox get selected as handler loops thru the mailbox list. Yes, some mailboxes do belong to accounts, but I don't think you need that. When I run my script containing the scanMailboxes handler, I can see it stepping thru EVERY mailbox. You might want to try it first with a script that does nothing but select each mailbox.

 _______________________________________________
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: Mail Search surrogate
      • From: Luther Fuller <email@hidden>
References: 
 >Re: Unicode Character in File Name (From: CYB <email@hidden>)
 >Re: Unicode Character in File Name (From: Luther Fuller <email@hidden>)
 >Re: Unicode Character in File Name (From: "Mark J. Reed" <email@hidden>)
 >Re: Unicode Character in File Name (From: Luther Fuller <email@hidden>)
 >Re: Unicode Character in File Name (From: Christopher Nebel <email@hidden>)
 >Re: Unicode Character in File Name (From: Luther Fuller <email@hidden>)
 >Re: Unicode Character in File Name (From: Christopher Nebel <email@hidden>)
 >Re: Unicode Character in File Name (From: "Mark J. Reed" <email@hidden>)
 >Re: Unicode Character in File Name (From: Doug McNutt <email@hidden>)
 >Mail Search surrogate (From: Gil Dawson <email@hidden>)
 >Re: Mail Search surrogate (From: Luther Fuller <email@hidden>)
 >Re: Mail Search surrogate (From: Gil Dawson <email@hidden>)

  • Prev by Date: Re: Mail Search surrogate
  • Next by Date: Re: DS_Store files
  • Previous by thread: Re: Mail Search surrogate
  • Next by thread: Re: Mail Search surrogate
  • Index(es):
    • Date
    • Thread