Re: Problem creating new mailbox
Re: Problem creating new mailbox
- Subject: Re: Problem creating new mailbox
- From: Mark Lawrence <email@hidden>
- Date: Mon, 8 Jun 2009 11:40:51 +0100
On 8 Jun 2009, at 10:12, Philip Aker wrote:
First up thanks for the response. On 2009-06-08, at 01:39:05, Mark Lawrence wrote:
[…] Could someone please help, I'm getting it in the neck from my boss.
1. Get a new vampire. 2. tell application "Mail" to make new mailbox with properties {name:"articles/print/journals"}
#2 works for me on 10.5.7.
Works fine for me on 10.5.6 but not what I want. To repeat my original request and add some extra bits.
I'm trying to automate the create of mailboxes and am failing dismally. The first piece of code shows that I can access the target mailbox and retrieve the contents. tell application "Mail" set supplierMailbox to mailbox "Suppliers" of mailbox "futuremedia" of account "shared" set supplierMailbox to mailboxes in supplierMailbox end tell The response to this is a list the first entry being mailbox "user/futuremedia/Suppliers/2xstream" of account "shared" of application "Mail"
The next piece of code gives AppleScript Error Mail got an error: AppleEvent handler failed. tell application "Mail" set supplierMailbox to mailbox "Suppliers" of mailbox "futuremedia" of account "shared" make new mailbox in supplierMailbox with properties {name:"test"} end tell Here's the console output which hopefully helps. 08/06/2009 11:05:45 Mail[1128] replaceInMailboxes:atIndex: called with value: <MailboxUid:0x175baab0 (relative path=, attributes=0x0)> 08/06/2009 11:05:45 Mail[1128] An exception was thrown during execution of an NSScriptCommand... 08/06/2009 11:05:45 Mail[1128] Can't replace value in mailboxes at index 1877 with object: <MailboxUid:0x175baab0 (relative path=, attributes=0x0)>
I've checked that there isn't a mailbox called test under the target Suppliers mailbox. I can manually create and delete a test mailbox under the target no problem. echo email@hidden@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.
|
_______________________________________________
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