Hi,
So just like the title says, I need get my script to find a message in Mail by the subject line and then pull the content from it and set it to the clipboard so that AS can parse thru the text. I posted this on a forum, but I'm not getting any help.
I don't if this helps, but I'm thinking something like this:
Tell application "Mail"
if theMsg contains "this subject" with less than or equal to 7 days of current date then set msgContent to content
else display dialog "No such message exists"
end if
end tell
Right now, this script works, but I have to select the message and switch to mail before the script runs. Eventually, this will go into AS studio so the whole thing can be triggered by a button in IB. But thats for later.
delay 2
-- XXX This section tells mail to get data XXX --
tell application "Mail"
set foo to a reference to item 1 of (get selection)
tell foo
set jazzSubject to subject
set jazzDate to date sent
set allJazzStats to content
end tell
end tell
return jazzSubject & jazzDate & allJazzStats
I've looked around for a couple day now, and haven't gotten it to work so any input would be beyond appreciated.
Thanks!
Ely @ apple