• 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
Mail question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail question


  • Subject: Mail question
  • From: Rob Lewis <email@hidden>
  • Date: Mon, 24 Jan 2005 20:35:58 -0800

I'm new at scripting Mail and I understand it's quirky, but this?

1. Manually select a few messages in a mailbox.

2. Run this statement:

tell application "Mail" to get the selection

returns a list such as this: {message 5 of mailbox "INBOX" of account "WhidbeyNET" of application "Mail", message 8 of mailbox "INBOX" of account "WhidbeyNET" of application "Mail", message 13 of mailbox "INBOX" of account "WhidbeyNET" of application "Mail"}

3. Run this:

tell application "Mail" to count items of the selection

returns (correctly): 3

4. But run this:

tell application "Mail" to get (item 1 of the selection) --(with or without parens)

returns an error message: "Mail got an error: NSCannotCreateScriptCommandError"

The command to get item 1 of a list fails?!
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mail question
      • From: Michelle Steiner <email@hidden>
    • Re: Mail question
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Re: iWork Pages
  • Next by Date: Re: Mail question
  • Previous by thread: RE: AppleScript bug?
  • Next by thread: Re: Mail question
  • Index(es):
    • Date
    • Thread