• 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: applescripting sub mailboxes in Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescripting sub mailboxes in Mail


  • Subject: Re: applescripting sub mailboxes in Mail
  • From: "Stockly, Ed" <email@hidden>
  • Date: Tue, 17 Nov 2015 00:46:18 +0000
  • Thread-topic: applescripting sub mailboxes in Mail

In a quick glance it looks like you’ve got the property spec wrong. 

I didn’t fix and test the other versions, but it looks the same in them.

Or, am I missing something? (Haven’t been following the thread, that closely, but I’m going to be scripting Mail this week…)



tell application "Mail"
activate
try
--make new mailbox with properties "Year 2016” — doesn’t work

make new mailbox with properties {name:"Year 2016”}— works
say "Mail box Year 2016 created."
on error errmsg
say "Mail box 2016 try one failed to be created"
end try
end tell


On Nov 16, 2015, at 3:59pm, Brian Christmas <email@hidden> wrote:



tell application "Mail"
activate
try
make new mailbox with properties "Year 2016"
say "Mail box Year 2016 created."
on error errmsg
say "Mail box 2016 try one failed to be created"
end try
try
make new mailbox at beginning with properties "Year 2016"
say "Mail box Year 2016 created."
on error errmsg
say "Mail box 2016 try two failed to be created"
end try
try
make new mailbox at beginning of mailboxes of mailbox "On My Mac" with properties "Year 2016"
say "Mail box Year 2016 created."
on error errmsg
say "Mail box 2016 try three failed to be created"
end try
try
make new mailbox at beginning of mailboxes of mailbox "On My Mac" with properties "Year 2016/11"
say "Mail box Year 2016 created, sub mailbox 11 created"
on error errmsg
say "Mail box 2016 11 failed to be created"
end try
try
make new mailbox at beginning of mailboxes of mailbox "Year 2016/11" with properties {"2016 11 17"}
on error errmsg
say "Mail box 2016 11 17 failed to be created"
end try
end tell


 _______________________________________________
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: applescripting sub mailboxes in Mail
      • From: Brian Christmas <email@hidden>
    • Re: applescripting sub mailboxes in Mail
      • From: Brian Christmas <email@hidden>
References: 
 >Re: applescripting sub mailboxes in Mail (From: Brian Christmas <email@hidden>)
 >Fwd: applescripting sub mailboxes in Mail (From: Brian Christmas <email@hidden>)

  • Prev by Date: Fwd: applescripting sub mailboxes in Mail
  • Next by Date: Re: applescripting sub mailboxes in Mail
  • Previous by thread: Fwd: applescripting sub mailboxes in Mail
  • Next by thread: Re: applescripting sub mailboxes in Mail
  • Index(es):
    • Date
    • Thread