Applescript: Get message content from Mail

Posts: 30
Joined: 2002.10
Post: #1
I have an Applcescript that worked with Outlook Express but doesn't with Mail.
The code-lines are:

set theMSGs to (current messages)
set theMSG to item 1 of theMSGs
set theContent to content of theMSG

They should put the content of the current (selected) email-message into the variable "theContent".

The problem seems to be the "current messages".
I couldn't find any help for that. Or I'm too stupid maybe.
Anyone can help to make this work with Mail?

Mac games free download:
Quote this message in a reply
Posts: 509
Joined: 2002.09
Post: #2
Try opening the Dictionary from Main. In Script Editor select Open Dictionary from the File menu and on the window select Mail and click open.

In the window that follows you'll see what can be scripted in Mail.

"When you dream, there are no rules..."
Quote this message in a reply
Posts: 30
Joined: 2002.10
Post: #3
Yes, that's what I already did. "message" is there, but I don't know why it doesn't work. It seems to be a problem with "current". Don't know. That's what I need help with.
I couldn't find any documentation which I can understand.

Mac games free download:
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  NSMutableArray wont let me remove its content Bommbomm 2 8,310 Mar 8, 2011 01:21 PM
Last Post: Bommbomm
  Objective-C message call efficiency Blacktiger 10 8,016 Aug 20, 2006 03:37 AM
Last Post: OneSadCookie
  Good Time For Applescript? Nick 1 3,575 Jun 12, 2005 07:27 AM
Last Post: Andrew
  Applescript-NSToolbar Coin 0 3,120 Mar 14, 2005 12:06 AM
Last Post: Coin
  Applescript+Cocoa URL source stealing mania! Coin 7 7,259 Mar 12, 2005 02:02 PM
Last Post: Coin