• 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 scripting…
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail scripting…


  • Subject: Re: Mail scripting…
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 7 Apr 2008 10:31:00 -0700


On Apr 7, 2008, at 9:54 AM, awaw wrote:
How can I get this "property" and use it to construct dynamically the name of the mbox and reach
for example "Society/Computer/Apple" and then continue the script as under with "tell mailbox mbox"

The following script fragment will return a list of mailboxes; each item of the list will be either an empty list or a list of unread messages in a mailbox.

tell application "Mail"
messages of mailboxes whose read status is false
end tell

For instance, right now, I get this result:

{{}, {}, {message id 864641 of mailbox "Applescript" of application "Mail"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {message id 864640 of mailbox "Freecycle" of application "Mail", message id 864638 of mailbox "Freecycle" of application "Mail", message id 864636 of mailbox "Freecycle" of application "Mail"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {message id 864642 of mailbox "Prius 2008" of application "Mail", message id 864637 of mailbox "Prius 2008" of application "Mail"}, {message id 864643 of mailbox "Prius Tech" of application "Mail"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}}

I can't figure out how to extract the non-empty items without looping, though.

-- Michelle

-- 
My choice early in life was either to be a piano-player in a whorehouse or a politician.  And to tell the truth, there's hardly any difference.
-- Harry S. Truman (circa 1962)

 _______________________________________________
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 scripting…
      • From: awaw <email@hidden>
References: 
 >Re: Mail scripting… (From: awaw <email@hidden>)

  • Prev by Date: Scripting Sound Control Panel
  • Next by Date: Re: Mail scripting…
  • Previous by thread: Re: Mail scripting…
  • Next by thread: Re: Mail scripting…
  • Index(es):
    • Date
    • Thread