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


Click here to return to the 'Way to detect (and speak) "REPLY from..."?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Way to detect (and speak) "REPLY from..."?
Authored by: dcollett on Mar 19, '03 03:14:19AM

Can any of you experts out there supply us with the method and/or short script to have the Mail.app say, for example, "Mail from John" if it is a new message, or "Reply from John" if it is an actual reply (RE:)?

These voices are great. Thanks for the hint!



[ Reply to This | # ]
Way to detect (and speak) "REPLY from..."?
Authored by: Frederico on Mar 19, '03 04:52:38PM

Easy:

tell application "Microsoft Entourage"
--optionally comment-out the following line
if frontmost then return -- don't announce if Entourage is frontmost application
set selectedMessages to current messages
repeat with theMessage in selectedMessages
set theName to sender of theMessage
set theName to display name of theName
set theSubject to subject of theMessage
set theVoice to "Kathy"
if theSubject contains "RE:" or theSubject contains "re:" or theSubject contains "Re:" then
set thePrefix to "a reply from..."
else
set the prefix to "a new message from..."
end if
say thePrefix & theName & "...regarding..." & theSubject using theVoice
end repeat
end tell



[ Reply to This | # ]
Way to detect (and speak) "REPLY from..."?
Authored by: Frederico on Mar 19, '03 04:55:47PM

Oops... there was a typo in the script above; try this one:

tell application "Microsoft Entourage"
--optionally comment-out the following line
if frontmost then return -- don't announce if Entourage is frontmost application
set selectedMessages to current messages
repeat with theMessage in selectedMessages
set theName to sender of theMessage
set theName to display name of theName
set theSubject to subject of theMessage
set theVoice to "Kathy"
if theSubject contains "RE:" or theSubject contains "re:" or theSubject contains "Re:" then
set thePrefix to "a reply from..."
else
set thePrefix to "a new message from..."
end if
say thePrefix & theName & "...regarding..." & theSubject using theVoice
end repeat
end tell



[ Reply to This | # ]
Way to detect (and speak) "REPLY from..."?
Authored by: dcollett on Mar 20, '03 03:58:12AM

Hi. Thanks for this script. Can you please show me what modifications to it would be necessary to play a .aiff file rather than use the 'say' command? This way, I could use any sound or recorded voice (such as the AT&T voices) instead of Apple's voices.

Thanks!



[ Reply to This | # ]
Way to detect (and speak) "REPLY from..."?
Authored by: Frederico on Mar 20, '03 01:02:24PM

See my reply above to MacZac (Chris) in which I detail scipt and needed additions to play AIFF files.



[ Reply to This | # ]
Way to detect (and speak) "REPLY from..."?
Authored by: TigerKR on Mar 19, '03 08:28:01PM

"Can any of you experts out there supply us with the method and/or short script to have the Mail.app say, for example, "Mail from John" if it is a new message, or "Reply from John" if it is an actual reply (RE:)?"

Sure, just look for "re:" in the subject field as well as the email name, or real name of the person you're looking to announce.



[ Reply to This | # ]