• 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 14:13:34 -0700

On Apr 7, 2008, at 1:49 PM, awaw wrote:
But I was thinking of something more "generic" or "universal".

"like" :
if the mailbox have a subfolder then 
   get the name of the subfolder -- it's a mailbox for Mail…
   if message exists then…

The following script will search recursively through all mailboxes that contain mailboxes.

tell application "Mail" to my searchmailboxes(mailboxes whose mailboxes is not {})

on searchmailboxes(mailboxList)
repeat with thisMailbox in mailboxList
tell application "Mail"
my searchmailboxes(thisMailbox)
-- search for unread messages here
end tell
end repeat
end searchmailboxes

--
"If I were not an atheist, I would believe in a God who would choose to save people on the basis of the totality of their lives and not the pattern of their words. I think he would prefer an honest and righteous atheist to a TV preacher whose every word is God, God, God, and whose every deed is foul, foul, foul."  -- Isaac Asimov


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

  • Prev by Date: Watermark PDF - visible when printed
  • Next by Date: Re: Mail scripting…
  • Previous by thread: Re: Mail scripting…
  • Next by thread: Re: Mail scripting…
  • Index(es):
    • Date
    • Thread