search in mail
search in mail
- Subject: search in mail
- From: Joshua Whalen <email@hidden>
- Date: Sun, 2 Jan 2011 05:54:39 -0500
I'm trying to write a script that will loop through inbox, and extract the subject line from every unread message a save it as a text string.
I'm using one of apple's sample scripts as a template, and where I'm getting hung up is on how to set the selection to every unread message of mailbox "mybox"
could anyone offer a little input?
Here's the routine as it is now. I'm sure many of you will recognize it's ancestry.
tell application "Mail"
set theMessages to contents of inbox
repeat with thisMessage in theMessages
set AppleScript's text item delimiters to {ASCII character 10}
set thisSender to sender of thisMessage as string
set thisData to subject of thisMessage as string
if thisSender contains "voicemail@gizmo5" then
set myvoicemail to thisData
set AppleScript's text item delimiters to {"+"}
my stringSlicer(myvoicemail)
end if
end repeat
end tell
TIA!!
Joshua
Joshua Whalen
+1 (212) 457-9908
email@hidden
email@hidden
http://www.panix.com/~joshua/resume.html
"Vision without action is a day dream,
Action without vision is a nightmare."
-- Japanese proverb
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden