Scripting Mail.app
Scripting Mail.app
- Subject: Scripting Mail.app
- From: Reinhold Penner <email@hidden>
- Date: Fri, 11 Jan 2002 12:36:13 -1000
I have a few questions about scripting OS X's Mail application. Does
anyone know how to accomplish the following from AS:
tell "Mail" to fetch new mail
tell "Mail" to open its main window when it's closed
tell "Mail" to select the first mailbox that contains unread messages
So in essence, what I want to do is the following:
tell application "Mail"
activate
-- check if main window exists - if so, bring it to front - if not,
open it
-- check mail on IMAP account
-- select first unread message (if not possible then select INBOX)
end tell
TIA for any pointers,
-Reinhold