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


Click here to return to the 'Here's my take' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Here's my take
Authored by: jcstudio on Mar 07, '03 09:35:41AM
Okay, I this may be going over the top. But it's so fun!
on perform_mail_action(info) tell application "Mail" set theMessages to |SelectedMessages| of info repeat with thisMessage in theMessages set AppleScript's text item delimiters to {""} set thisSender to sender of thisMessage as string set thisSubject to subject of thisMessage as string set brkpos to offset of "

[ Reply to This | # ]
Here's my take (again)
Authored by: jcstudio on Mar 07, '03 09:40:26AM

Whoops! I guess I don't understand how to use the <code> tag. Here it is in plain text:

on perform_mail_action(info)
tell application "Mail"
set theMessages to |SelectedMessages| of info
repeat with thisMessage in theMessages
set AppleScript's text item delimiters to {""}
set thisSender to sender of thisMessage as string
set thisSubject to subject of thisMessage as string
set brkpos to offset of "<" in thisSender
if (brkpos is greater than 1) then
set thisSender to (text items 1 through (brkpos - 1)) of thisSender as string
if thisSender contains "\"" then
set AppleScript's text item delimiters to {"\""}
set thisSender to text item 2 of thisSender as string
end if
else
if (brkpos is equal to 1) then
set thisSender to (text items 2 through -1) of thisSender as string
end if
set AppleScript's text item delimiters to {"@"}
set thisSender to text item 1 of thisSender as string
end if
say "You have new Mail from " using "Victoria"
say thisSender using "Bruce"
say "regarding" using "Victoria"
say thisSubject using "Bruce"
end repeat
end tell
end perform_mail_action



[ Reply to This | # ]
Here's my take (again)
Authored by: porkchop_d_clown on Mar 07, '03 10:41:14AM

use [code] and [/code] not <code> and </code> - [code] is an instruction to the discussion software here to preserve line breaks and indenting.

---
--
knock knock



[ Reply to This | # ]