Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'eliminate the middle-man' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
eliminate the middle-man
Authored by: jnutting on Mar 20, '03 04:18:22AM

No need to generate all these sound files at all, just have your applescript do the talking on the fly! Make a rule to send all your non-junk mail to this:

on perform_mail_action(info)
	tell application "Mail"
		set selectedMessages to |SelectedMessages| of info
		repeat with eachMessage in selectedMessages
			set theFromAddress to sender of eachMessage
			set speechText to "new mail from " & theFromAddress
			say speechText using "Victoria"
		end repeat
	end tell
end perform_mail_action

Of course you could modify this so that messages from particular senders could trigger different bits of speech.

The bulk of this script came from another hint on this site which explained how to get the info about which message triggered the currently-running rule.

I'm sure someone out there with more applescript knowledge would be able to parse just the name out of "sender" so that it doesn't read off the whole email address after the name.



[ Reply to This | # ]