I have this script run everytime I get new email in Mail. It work very well in Panther but if I try to run it in Tiger it kills Mail.
Can someone look over the script and tell me were it’s broken??
using terms from application "Mail"
on perform mail action with messages theSelectedMessages
tell application "System Events" to set _app to (name of processes whose frontmost is true) as text
repeat with eachMessage in theSelectedMessages
set theSender to extract name from sender of eachMessage
set theSubject to subject of eachMessage
tell application _app to display dialog "-:YOU HAVE MAIL:-" & return & "From: " & theSender & return & "Subject: " & theSubject buttons {"Æ’"} default button "Æ’" with icon stop --giving up after 5
end repeat
end perform mail action with messages
end using terms from
end
end
Browser: Safari 412
Operating System: Mac OS X (10.4)