• 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: Yvan KOENIG <email@hidden>
  • Date: Thu, 19 Nov 2015 18:11:00 +0100


Le 2015/11/19 à 18:05, Christopher Stone <email@hidden> a écrit :

…
Hey Yvan,

Interesting and relevant.

This sequence works fine:

tell application "Mail"
  make new mailbox with properties {name:"Year 2016/A/"} # WORKS
  make new mailbox with properties {name:"Year 2016/A/01/"} # WORKS
  make new mailbox with properties {name:"Year 2016/A/02/"} # WORKS
  make new mailbox with properties {name:"Year 2016/A/02/Tier04/"} # WORKS
  make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05/"} # WORKS
  make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05/Tier06/"} # WORKS
  make new mailbox with properties {name:"Year 2016/A/03/"} # WORKS
end tell

If I just change the 'Tier05' mailbox to exclude the ending '/' that line still works.

make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05"} # WORKS
make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05/Tier06/"} # FAILS

But the following 'Tier06' line fails, even though it has a trailing '/'. 

make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05/"} # WORKS
make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05/Tier06/"} # WORKS

Add back in the trailing '/' in the 'Tier05' line and the 'Tier06' line works again.

As you say the only certain way to create all mailboxes is to use the trailing slash.

AND

If you did NOT use a trailing slash when creating the mailbox it MAY NOT allow sub-mailboxes to be created in it.

--
Take Care,
Chris

__
Hello Chris

I’m too busy to do the test but it would be interesting to try that :
delete a mailbox created by a script without the ending slash
recreate it with a script with the ending slash
try to create a sub-mailbox by script.


Yvan KOENIG running El Capitan 10.11.1 in French (VALLAURIS, France) jeudi 19 novembre 2015 18:10:55


 _______________________________________________
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

References: 
 >Re: applescripting sub mailboxes in Mail (From: John Mitchell <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Brian Christmas <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Christopher Stone <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Yvan KOENIG <email@hidden>)
 >Re: applescripting sub mailboxes in Mail (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: applescripting sub mailboxes in Mail
  • Next by Date: Re: Email to Script Debugger or Script Editor
  • Previous by thread: Re: applescripting sub mailboxes in Mail
  • Next by thread: launch behavior
  • Index(es):
    • Date
    • Thread