Re: On My Mac
Re: On My Mac
- Subject: Re: On My Mac
- From: Luther Fuller <email@hidden>
- Date: Mon, 01 Jun 2009 19:03:35 -0500
On Jun 1, 2009, at 4:25 PM, Deivy Marck Petrescu wrote:
I ran this
tell application "Mail" to get container of mailbox 1
-->account "On My Mac" of application "Mail"
So you'd say "aha! `On My Mac' is an account..."
So, I tried that. I think we have a bug here. If I use an outer
mailbox under the "On My Mac" heading instead of 'mailbox 1', the 'get
container ...' should respond with an error, but instead the response
to the console is '<<class mact>> "On My Mac" '. (on error is not
invoked in the try block.) Something is amiss here.
On Jun 1, 2009, at 6:08 PM, Deivy Marck Petrescu wrote:
the answer is "Yes".
All the mailboxes that have no account.
They are the first mailboxes. You can reach them directly without
calling the account
tell app "Mail"
set l to count mailboxes
repeat with j from 1 to l
display dialog "mailbox " & j &" is an \"On My Mac\" mailbox"
end repeat
So, I tried this ...
tell application "Mail"
activate
try
set frontViewer to (message viewer 1)
on error
return
end try
--------------------
repeat with j from 1 to (count mailboxes)
set selected mailboxes of frontViewer to {mailbox j}
delay 0.3
end repeat
end tell
and immediately noticed that mailboxes NOT under the heading "On My
Mac" are selected.
The purpose of the 'On_My_Mac(mbox)' handler is to return true only if
the 'mbox' is under the heading "On My Mac" in the frontViewer's
mailbox list. The current handler seems to do this correctly ... but
not simply.
So close, yet ... ?
_______________________________________________
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
References: | |
| >On My Mac (From: Luther Fuller <email@hidden>) |
| >Re: On My Mac (From: Deivy Marck Petrescu <email@hidden>) |