Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 9, 2011, 08:14 PM   #1
lynkynpark86
macrumors 6502
 
Join Date: Mar 2010
Location: Maine, USA, Earth, Solar System, Milky Way, Universe
Mail applescript?

I'm trying to make a script that gets the newest message in Mail, and sets the message's body to a variable. Something like:
Code:
tell application "Mail"
     set messageBodyVariable to (body of (newest message))
end tell
Any ideas?
__________________
White MacBook, 2.13 GHz, 2 GB RAM, 160 GB HD
Dell w/ 4GB RAM, AMD Athlon
iPod Touch 4G (or 5G :P), 32GB, iOS 5.1, awaiting jailbreak.
lynkynpark86 is offline   0 Reply With Quote
Old Apr 9, 2011, 10:39 PM   #2
ccamelot
macrumors member
 
Join Date: Feb 2010
Yeah, I have an idea...

Try this one:

Code:
tell application "Mail"
	set latestMessage to content of first message of inbox
end tell
best
Les
ccamelot is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Simple AppleScript for mail.app JosCiv OS X 0 Jul 26, 2013 11:32 AM
AppleScript with Mail JordanJ Mac Programming 1 Nov 30, 2012 02:22 PM
[OS X 10.8.2] AppleScript Mail script help moonman239 Mac Programming 4 Nov 27, 2012 06:32 PM
How does one select the Archive folder in Mail using Applescript? amityweb Mac Programming 1 Nov 15, 2012 07:20 AM
Using applescript with ML mail andymac2210 OS X 10.8 Mountain Lion 6 Aug 30, 2012 01:35 PM

Forum Jump

All times are GMT -5. The time now is 03:28 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC