• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scripting mail to select mailboxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting mail to select mailboxes


  • Subject: Re: scripting mail to select mailboxes
  • From: cricket <email@hidden>
  • Date: Wed, 12 Mar 2003 12:12:02 -0800

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.
  • Follow-Ups:
    • Re: scripting mail to select mailboxes
      • From: "David P. Baker" <email@hidden>
References: 
 >scripting mail to select mailboxes (From: "David P. Baker" <email@hidden>)

  • Prev by Date: Re: birth date from Address Book
  • Next by Date: Re: assistance with script, part 2
  • Previous by thread: Eudora nickname bugs fixed Was: Re: scripting "Mail"
  • Next by thread: Re: scripting mail to select mailboxes
  • Index(es):
    • Date
    • Thread