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

Similar Threads
thread Thread Starter Forum Replies Last Post
Can't make a new folder in my archive section of OSX Mail (Nor iCloud.com) Siderz OS X Mavericks (10.9) 1 Jan 5, 2014 09:47 AM
iPad: Archive folder Edenforge iOS 7 2 Sep 20, 2013 06:11 PM
Mail.app, iOS Mail, and Gmail Account Archive Feature kepardue OS X 10.8 Mountain Lion 2 Nov 13, 2012 11:19 AM
How do I delete the mail folder "Archive"? Bermudapilot OS X 10.8 Mountain Lion 0 Aug 29, 2012 10:46 AM
Mail Archive folder glitch? jephrey OS X 10.8 Mountain Lion 0 Jul 26, 2012 09:56 AM

Forum Jump

All times are GMT -5. The time now is 05:42 PM.

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

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