• 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: Anyway to update Mail.app Rules in Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anyway to update Mail.app Rules in Applescript?


  • Subject: Re: Anyway to update Mail.app Rules in Applescript?
  • From: Robert Nicholson <email@hidden>
  • Date: Mon, 21 Jan 2013 21:53:04 -0600

Should this work because it doesn't appear to?

ell application "Mail"
tell application "Mail"
repeat with r in (get rules)
if should move message of r then
set mb to move message of r
set mailboxPath to (name of mb) as rich text
set mboxContainer to (container of mb)
if name of mb contains "2012" then
set mailboxPath to "2013"
repeat
try
set mailboxPath to ((name of mboxContainer) as rich text) & "/" & mailboxPath
set mboxContainer to container of mboxContainer
on error
exit repeat
end try
end repeat
try
set move message of r to make new mailbox with properties {name:mailboxPath}
on error
display alert "Error creating mailbox " & mailboxPath
end try
end if
end if
end repeat
end tell
end tell

On Jan 21, 2013, at 8:18 PM, Michelle Steiner <email@hidden> wrote:

On Jan 21, 2013, at 5:22 PM, Robert Nicholson <email@hidden> wrote:

 _______________________________________________
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: Anyway to update Mail.app Rules in Applescript?
      • From: Robert Nicholson <email@hidden>
References: 
 >Anyway to update Mail.app Rules in Applescript? (From: Robert Nicholson <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Michelle Steiner <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Robert Nicholson <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Michelle Steiner <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Robert Nicholson <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Michelle Steiner <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Robert Nicholson <email@hidden>)
 >Re: Anyway to update Mail.app Rules in Applescript? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Anyway to update Mail.app Rules in Applescript?
  • Next by Date: Re: Anyway to update Mail.app Rules in Applescript?
  • Previous by thread: Re: Anyway to update Mail.app Rules in Applescript?
  • Next by thread: Re: Anyway to update Mail.app Rules in Applescript?
  • Index(es):
    • Date
    • Thread