Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 13, 2012, 11:27 AM   #1
amityweb
macrumors newbie
 
Join Date: Oct 2010
Location: Wales
How does one select the Archive folder in Mail using Applescript?

Does anyone know how to select the Mail Archive folder in Mail using Applescript?

This code does not work, BUT if I change Archive to any other folder it works fine. It is only the Archive folder which is not working!
Code:
tell application "Mail"
    set selected mailboxes of message viewer 1 to {mailbox "Archive"} of account "My Email"
end tell
Thanks
amityweb is offline   0 Reply With Quote
Old Nov 15, 2012, 07:20 AM   #2
amityweb
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Location: Wales
Hi. I am using this in a script to process emails in a "Follow Up" folder to create a task in Omnifocus. I found that when I move mesages to another folder, Mail still thinks that message is in there and keeps processing it. So selecting the destination folder (Archive) makes Mail not keep that message in the original folder.

Anyway, this script on its own does not work (so nothing to do with the rest of my script). I just cannot see how to select the folder using Applescript. So I keep getting duplicate tasks created. I need to select the Archive folder in my automated applescript.

Thanks
amityweb is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:54 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC