• 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: Wed, 18 Nov 2015 12:21:37 +0100


Le 2015/11/17 à 22:26, Christopher Stone <email@hidden> a écrit :

Hey Brian,

On my El Capitan 10.11.1 system these all work, except the Tier06 one.

-------------------------------------------------------------------------------------------
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
try
make new mailbox with properties {name:"Year 2016/B/Tier03/Tier04/Tier05/Tier06"} # FAILS
end try
make new mailbox with properties {name:"Year 2016/A/03/"} # WORKS
end tell
-------------------------------------------------------------------------------------------

--
Best Regards,
Chris

Hello Chris

I added a slash at the end of the instruction :
make new mailbox with properties {name: "Year 2016/B/Tier03/Tier04/Tier05"}
so it became:
make new mailbox with properties {name: "Year 2016/B/Tier03/Tier04/Tier05/"}

This time, I got the box Tier06.
I added the instruction :
make new mailbox with properties {name: »Year 2016/B/Tier03/Tier04/Tier05/Tier06/Tier07/"} 
It failed so I edited the instruction creating the box Tier06 so that it end with a slash.
This code created the box Tier07.
My understanding is that if we want to be able to insert sub-boxes we must always put a slash at the end of instructions creating them.
Applying this « rule » the instruction :
make new mailbox with properties {name: »Year 2016/B/Tier03/Tier04/Tier05/Tier06/Tier07/Tier08/Tier09/Tier10/Tier11/"} 
created its entire hierarchy.
So, the engineers may continue to write that we don’t have to use the slash, I will ALWAYS insert an ending one.




Yvan KOENIG running El Capitan 10.11.1 in French (VALLAURIS, France) mercredi 18 novembre 2015 12:21:31

 _______________________________________________
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: Christopher Stone <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>)

  • Prev by Date: Re: POSIX vs Macinotosh Path Strings
  • Next by Date: Email to Script Debugger or Script Editor
  • Previous by thread: Re: applescripting sub mailboxes in Mail
  • Next by thread: Re: applescripting sub mailboxes in Mail
  • Index(es):
    • Date
    • Thread