Re: Mail rule applescript and displaying alert
Re: Mail rule applescript and displaying alert
- Subject: Re: Mail rule applescript and displaying alert
- From: Philip Aker <email@hidden>
- Date: Thu, 20 Mar 2008 07:04:01 -0700
On 08-03-20, at 05:21, Jonny Taylor wrote:
I've been trying to sort out an applescript which displays an alert
when certain urgent messages are received by apple Mail. I have the
following script (for Tiger):
using terms from application "Mail"
on perform mail action with messages selectedMessages
repeat with eachMessage in selectedMessages
tell application "Mail"
display alert "test alert" message "test message" as warning
end tell
end repeat
end perform mail action with messages
end using terms from
This doesn't work as I'd hoped - a blank dialog appears with no "OK"
button or any other content, and I have to force-quit Mail.
Can anyone suggest what I'm doing wrong? This same question was
asked by John C Welch on this list in July 06, but nobody offered
an answer...
I believe Mail is running this portion in a secondary thread and
normally AppleScript UI has to run on the main thread (haven't checked
since 10.4).
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden