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


Click here to return to the 'How 'bout this one?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How 'bout this one?
Authored by: applepal on Jan 16, '03 08:12:11PM

it's the first i ever wrote (with the first ost as example, thx)... this one works for me...

on perform_mail_action(info)
set volume 4
tell application "Mail"
set selectedMessages to |SelectedMessages| of info
set theRule to |Rule| of info
set amountofselectedMessages to count selectedMessages
if amountofselectedMessages > 1 then
set begintxt to "you have " & amountofselectedMessages & " new messages. [[emph -; rate 100]]from, "
else
set begintxt to "you have a message from "
end if
set counter to 0
repeat with eachMessage in selectedMessages
set counter to counter + 1
set theSender to sender of eachMessage
if counter > 1 then
set begintxt to "[[emph +; rate 200]]and from, "
end if
set theText to begintxt & theSender & " "
set adresbegin to offset of " 0 then
set theText to get text 1 thru adresbegin of theText
end if
say theText
end repeat
end tell
set volume 1
end perform_mail_action



[ Reply to This | # ]
How 'bout this one?
Authored by: applepal on Jan 16, '03 08:15:56PM

argh...

set adresbegin to offset of "<" in theText



[ Reply to This | # ]
How 'bout this one?
Authored by: russh on Jan 16, '03 09:15:40PM

Niiice. Fun script... though I think it would drive me nuts if I left it on for ALL messages. ;)

In addition to the typo you mentioned, you also need to delete the last "end if".. it's extra.



[ Reply to This | # ]