• 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 scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail scripting


  • Subject: Re: Mail scripting
  • From: Robert Poland <email@hidden>
  • Date: Thu, 14 Aug 2003 07:13:46 -0600

JD and others.

I found out why the script wasn't working for ruels. The following
worked just fine:

on perform_mail_action(info)
tell application "Mail"
set selectedMessages to |SelectedMessages| of info
set theRule to |Rule| of info
repeat with eachMessage in selectedMessages
set theSubject to subject of eachMessage
set theRuleName to name of theRule
set theText to "The rule named '" & theRuleName & "' B,
matched this message:" & return & return & B,
"Subject: " & theSubject
display dialog theText
end repeat
end tell
end perform_mail_action


What was lacking in the previous scripts was the "_" in
perform_mail_action, I think.

Maybe I'm propagating a bad habit, but I usually just type end and let the editor finish the line.
--
Bob Poland - Englewood, CO
http://www.ibrb.org/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Mail scripting
  • Next by Date: Close Excel Doc
  • Previous by thread: Re: Mail scripting
  • Next by thread: filemaker open local htm helpfile
  • Index(es):
    • Date
    • Thread