• 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: Is Mail scriptable ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is Mail scriptable ??


  • Subject: Re: Is Mail scriptable ??
  • From: cricket <email@hidden>
  • Date: Sat, 16 Nov 2002 11:59:24 -0800

On Saturday, November 16, 2002, at 06:25 AM, John Delacour wrote:

I can find no postings to this list and no scripts in Apple's Mail Scripts that hint to me that it's possible to do the most basic thing in Mail -- to get the contents of the message in the front window!

This is what I used to get the content of the message I'm currently composing to you and the list:

tell application "Mail"
set theCurrentWindowTitle to name of front window
set theMessages to every outgoing message whose subject is theCurrentWindowTitle
set theMessage to item 1 of theMessages
get content of theMessage
end tell

Not 100% safe, but it works.

Now all this seems so utterly unbelievable that I must be missing something very important and I look forward to enlightenment from the list and a script not exceeding 100 lines that will enable me to get the content and other properties of the message in the front window as you can in any sane application.

I did it in 6 and I was being verbose! ;)

We do need to wire up the window class to have a document property, such that you can get the contents more easily than this. I'll make sure we get it done.

- cricket

----->
Software Entomologist  Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
You're a plumber? What on _earth_ is that?
_______________________________________________
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: Is Mail scriptable ??
      • From: John Delacour <email@hidden>
References: 
 >Is Mail scriptable ?? (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Unresolved aliases to arglist of a droplet
  • Next by Date: Re: OK - so who ate my digests?
  • Previous by thread: Is Mail scriptable ??
  • Next by thread: Re: Is Mail scriptable ??
  • Index(es):
    • Date
    • Thread