• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail rule applescript and displaying alert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Mail rule applescript and displaying alert
      • From: demski <email@hidden>
References: 
 >Mail rule applescript and displaying alert (From: Jonny Taylor <email@hidden>)

  • Prev by Date: Re: How to Install Script Editor alone
  • Next by Date: Re: How to Install Script Editor alone
  • Previous by thread: Mail rule applescript and displaying alert
  • Next by thread: Re: Mail rule applescript and displaying alert
  • Index(es):
    • Date
    • Thread