• 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: myLoop: getting subject of messages in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: myLoop: getting subject of messages in Mail.app


  • Subject: Re: myLoop: getting subject of messages in Mail.app
  • From: cricket <email@hidden>
  • Date: Mon, 3 Mar 2003 13:50:37 -0800

On Friday, February 28, 2003, at 7:54 PM, Phebe Anggreani wrote:

Thanks for the reply. I actually solved it by defining the all messages before looping:

set allMsg to all messages of front message viewer
set selectedMsg to {}
repeat with thisMsg in allMsg

This somehow works.

Your original script would work if you added 'get' before 'all messages of front message viewer'. This is a common scripting mistake that is _incredibly_ easy to make, so don't feel too bad. No one else caught it on the list either, see? :)

You need to evaluate 'all messages of front message viewer' first before you can start iterating through it as a list. Putting a 'get' in front of it causes that evaluation to happen. Before being evaluated, think of 'all messages of front message viewer' as being a reference to one thing that has not yet been evaluated, rather than a list of already evaluated message objects.

Perhaps someone can explain it better, but that's the gist of the problem. By separating out the 'set allMsg to all messages of front viewer', the allMsg variable is set to the evaluation of 'all messages of front message viewer', which is a list of message objects.

Hope that helps,

- cricket

----->
Software Entomologist  Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
I know the human being and fish can co-exist peacefully.
_______________________________________________
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: myLoop: getting subject of messages in Mail.app
      • From: Bill Briggs <email@hidden>
    • Re: myLoop: getting subject of messages in Mail.app
      • From: John Delacour <email@hidden>
    • Re: myLoop: getting subject of messages in Mail.app
      • From: John Delacour <email@hidden>
  • Prev by Date: Re: anyone seen this FileMaker Pro bug?
  • Next by Date: Re: export e-mail attachments
  • Previous by thread: Re: myLoop: getting subject of messages in Mail.app
  • Next by thread: Re: myLoop: getting subject of messages in Mail.app
  • Index(es):
    • Date
    • Thread