Re: scripting mail to select mailboxes
Re: scripting mail to select mailboxes
- Subject: Re: scripting mail to select mailboxes
- From: "David P. Baker" <email@hidden>
- Date: Wed, 12 Mar 2003 16:20:37 -0500
OK, cool, thanks. Except that it doesn't quite work. I can set the
selected mailboxes to any standard mailbox, but if i include any
mailbox on my imap acccount, no luck. the interface does something
slightly wacky (like a half-highlighted row) but that's it. i can GET
the list of selected mailboxes fine if it includes imap boxes, but no
set.
set selected mailboxes of message viewer 1 to {trash mailbox, in
mailbox}
get selected mailboxes of message viewer 1
-- {in mailbox, trash mailbox}
set selected mailboxes of message viewer 1 to {drafts mailbox, sent
mailbox, mailbox "Stuff" of account "email@hidden"}
get selected mailboxes of message viewer 1
-- {in mailbox, trash mailbox}
Also, what's the deal with the floating cricket icon in your email? Is
that a wacky Mail developer easter egg?
--dpb
On Wednesday, March 12, 2003, at 03:12 PM, cricket wrote:
>
If you're running 10.2.3 or later, check out the message viewer class
>
in Mail's dictionary. If you wanted to do something simple like select
>
your Outbox, then return to you previous set of selected mailboxes,
>
you could use a script like this:
>
>
tell app "Mail"
>
tell message viewer 1
>
set savedSelectedMailboxes to selected mailboxes
>
set selected mailboxes to {out mailbox}
>
delay 5
>
set selected mailboxes to savedSelectedMailboxes
>
end tell
>
end tell
>
>
- cricket
>
>
On Wednesday, March 12, 2003, at 7:56 AM, David P. Baker wrote:
>
>
> I have my mail on a local imap server, with incoming mail filtered
>
> into several mailboxes via procmail. So therefore, my default view is
>
> to have several (currently 11) mailboxes simultaneously selected, so
>
> I see the union of all messages. First off, this makes mail really
>
> slow, but that's another topic. Second, I need a way to quickly
>
> select my set of mailboxes in a viewer window (if I select the Sent
>
> box for an instant, I have to get back to my set). Command-clicking
>
> my 11 boxes each time is a waste of time, but I don't see anything in
>
> Mail's dictionary that refers to the selected mailboxes -- only the
>
> selected messages.
>
>
>
> Can anyone suggest a good way of scripting this behavior (other than
>
> via UI scripting, which would be a hack)?
>
>
----->
>
Software Entomologist Mail for Mac OS X
>
http://www.apple.com/macosx/jaguar/mail.html
>
---------->
>
The photograph on the dashboard, taken years ago, turned around
>
backwards so the windshield shows. Every streetlight reveals the
>
picture in reverse.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.