• 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: Running Scripts from Mail Rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Scripts from Mail Rules


  • Subject: Re: Running Scripts from Mail Rules
  • From: email@hidden
  • Date: Fri, 27 Oct 2017 17:29:19 -0400

Back to my real script - I can’t even get PROPERTIES of a message.

I always get the "Got message” speech.
But it never displays a dialog, or does anything after that.


using terms from application "Mail"
        on perform mail action with messages Msgs
                set N to count of Msgs
                say "Messages: " & N
                repeat with i from 1 to N
                        say ("Start " & i)
                        try
                                set M to item i of Msgs
                                say ("Got message")
                                display dialog (properties of M)
                                set Nm to (sender of M)
                                say ("Got sender")
                                set S to (extract name from (sender of M) as
rich text)
                                say ("You have new mail from " & S)
                        on error
                                display dialog (errMsg as rich text)
                        end try
                        say ("end " & i)
                end repeat
        end perform mail action with messages
end using terms from



----------------------------------------------------------------
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: Running Scripts from Mail Rules
      • From: email@hidden
References: 
 >Running Scripts from Mail Rules (From: Steve Bird <email@hidden>)
 >Re: Running Scripts from Mail Rules (From: Ray Robertson <email@hidden>)
 >Re: Running Scripts from Mail Rules (From: Steve Bird <email@hidden>)
 >Re: Running Scripts from Mail Rules (From: email@hidden)

  • Prev by Date: Re: Running Scripts from Mail Rules
  • Next by Date: Re: Running Scripts from Mail Rules
  • Previous by thread: Re: Running Scripts from Mail Rules
  • Next by thread: Re: Running Scripts from Mail Rules
  • Index(es):
    • Date
    • Thread