• 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
Cannot make new Mail rule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot make new Mail rule


  • Subject: Cannot make new Mail rule
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 19 Dec 2014 15:51:48 +1100

G’day scripters

The following code should work, but doesn’t get to ‘say 1’.

It worked intermittently for a time, but then stopped. Any thoughts on why please? (Also, if I remove the ‘perform mail action, etc', I get an error).

Regards

Santa

tell application "Mail" to activate # unnecessary?
using terms from application "Mail"
say 0
on perform mail action with messages theMessages for rule theRule
say 1
tell application "Mail"
if (exists rule "* items to shift") then
delete rule "* items to shift"
end if
set newRule to make new rule at start of rules with properties {name:"Move to '* items to shift'", move message:mailbox "* items to shift", enabled:true, all conditions must be met:true}
tell newRule
make new rule condition at start of rule conditions with properties {rule type:message content, move message:"* items to shift"}
end tell
end tell
end perform mail action with messages
end using terms from
 _______________________________________________
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

  • Prev by Date: Re: JSA -- now I believe this is a bug (JSA or AS)
  • Next by Date: Copying files from DVD with errors
  • Previous by thread: Re: odd Numbers's behaviour
  • Next by thread: Copying files from DVD with errors
  • Index(es):
    • Date
    • Thread