• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
search in mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: search in mail
      • From: Michelle Steiner <email@hidden>
    • Re: search in mail
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Accessing/creating mailboxes in Mail.app
  • Next by Date: Re: search in mail
  • Previous by thread: Re: grep 2.7 & linked-images
  • Next by thread: Re: search in mail
  • Index(es):
    • Date
    • Thread