We create an navigate to IMAP-Mailboxes form FileMaker since years.
Since Yosemite - sometimes it runs - or not
Script is assembled in FileMaker and ten sent als AppleScript:
For testing I took it into ScriptEditor, to find out, what the Problem is…?
To create a MailBOX I send a full mailbox path to then “Create” command as “E/Example_MailBOX”.
It should create a mailbox "Example_Mailbox within the Mailbox “E” of account “KUNDEN”. Mailbox “E” already exists.
After Creating the mailbox Mail.app was activated and the the new mailbox should be selected.
Somebody has hint what has changed and how to fix it ?
tell application "Mail"
activate
set TargetAccount to "KUNDEN"
set NewMailboxPath to "E/EXAMPLE_MAILBOX"
tell account TargetAccount
if not (exists (mailbox "E/EXAMPLE_MAILBOX")) then
try
make new mailbox with properties {name:NewMailboxPath}
on error
tell me to display dialog "Die Mailbox " & NewMailboxPath & " konnte nicht erstellt werden. Bitte manuell Prüfen" buttons {"OK"} default button 1 giving up after 5
end try
end if
end tell
try
set selected mailboxes of message viewer 1 to {mailbox NewMailboxPath of account TargetAccount}
on error
set theNewWindow to make new message viewer
set selected mailboxes of theNewWindow to {mailbox NewMailboxPath of account TargetAccount}
end try
end tell