Applescript: Get message content from Mail

Member
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: http://www.zhanggames.com
Quote this message in a reply
Moderator
Posts: 508
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
Member
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: http://www.zhanggames.com
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 6,321 Mar 8, 2011 01:21 PM
Last Post: Bommbomm
  Objective-C message call efficiency Blacktiger 10 5,144 Aug 20, 2006 03:37 AM
Last Post: OneSadCookie
  Good Time For Applescript? Nick 1 2,607 Jun 12, 2005 07:27 AM
Last Post: Andrew
  Applescript-NSToolbar Coin 0 2,358 Mar 14, 2005 12:06 AM
Last Post: Coin
  Applescript+Cocoa URL source stealing mania! Coin 7 5,140 Mar 12, 2005 02:02 PM
Last Post: Coin