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


Click here to return to the 'announce messaes with speech' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
announce messaes with speech
Authored by: russh on Jan 16, '03 07:02:31PM
You can do that with a modified version of the Applescript I posted: Create a mail rule that screens for a specific sender. "joeblow@nowhere.com" Then as the last action in the rule, attach a compiled Applescript like this:
on perform_mail_action(info)
	tell application "Mail"
		set selectedMessages to |SelectedMessages| of info
		set theRule to |Rule| of info
		repeat with eachMessage in selectedMessages
			set theSender to sender of eachMessage
			set theRuleName to name of theRule
			set theText to "You have a new message from" & theSender
			say theText
		end repeat
	end tell
end perform_mail_action
I just tested the above. It works. When a message comes in that triggers the rule (in this example, from "Joe Blow"), your Mac will say: "You have a new message from Joe Blow " The script will add the name of any sender you set up a rule for. There is likely a way to make it not say the email address. That exercise is left to the reader. :)

[ Reply to This | # ]
announce messaes with speech
Authored by: russh on Jan 16, '03 07:10:52PM
Hate to reply to my own message, but not sure how to edit. I just wanted to be clear: this script does NOT use "Say" or any other CLI application. The "say" in the script part of standard Applescript. No piping or terminal commands required. :) (Not that there is anything wrong with that...)

I just wanted to be clear.. it really is that simple.

[ Reply to This | # ]