• 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: Applescipt in Mail rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescipt in Mail rules


  • Subject: Re: Applescipt in Mail rules
  • From: Steve Bird <email@hidden>
  • Date: Fri, 31 Jan 2014 18:17:54 -0500

OK, apparently there are TWO separate problems.
1… You cannot MOVE a message from the SENT box with a rule.
2… Something is wrong (as of 10.9) with the script I was using.

The example you sent seems to work:
> using terms from application "Mail"
> 	on perform mail action with messages Msgs
> 		repeat with Msg in Msgs
> 			set Msg to contents of Msg
> 			tell application "Mail" to set SndrName to extract name from sender of Msg
> 			display dialog SndrName
> 		end repeat
> 	end perform mail action with messages
> end using terms from

Whereas my original worked fine on 10.4-10.6 but not 10.9:
> on perform_mail_action(theData)
> 	tell application "Mail"
> 		set theSelectedMessages to |SelectedMessages| of theData
> 		set theRule to |Rule| of theData
> 		repeat with a from 1 to count theSelectedMessages
> 			set theMessage to item a of theSelectedMessages
> 			if read status of theMessage then
> 			else --only speak for unread msgs
> 				set theSender to sender of theMessage
> 				set theName to extract name from theSender
> 				say "You have mail from " & theName as rich text
> 			end if
> 		end repeat
> 	end tell
> end perform_mail_action

No error, just no action.  Even a BEEP() before the TELL is ignored.

----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com                     (toll free) 1-877-676-8175



 _______________________________________________
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: Applescipt in Mail rules
      • From: Shane Stanley <email@hidden>
References: 
 >Applescipt in Mail rules (From: Robert Cuilla <email@hidden>)
 >Re: Applescipt in Mail rules (From: Shane Stanley <email@hidden>)
 >Re: Applescipt in Mail rules (From: Steve Bird <email@hidden>)
 >Re: Applescipt in Mail rules (From: Axel Luttgens <email@hidden>)
 >Re: Applescipt in Mail rules (From: Steve Bird <email@hidden>)
 >Re: Applescipt in Mail rules (From: Bryan Harris <email@hidden>)
 >Re: Applescipt in Mail rules (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Applescipt in Mail rules
  • Next by Date: Re: Applescipt in Mail rules
  • Previous by thread: Re: Applescipt in Mail rules
  • Next by thread: Re: Applescipt in Mail rules
  • Index(es):
    • Date
    • Thread