• 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
Is 'new mail rule' underYosemite faulty?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is 'new mail rule' underYosemite faulty?


  • Subject: Is 'new mail rule' underYosemite faulty?
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 20 Dec 2014 13:17:12 +1100

G’day scripters

I’m trying to automatically create a new Mail rule, using the standard method, but in vanilla Applescript underYosemite, the method fails after my first line.

Even worse, when pasting the script into a new Xcode project, the code refuses to compile, showing an error in the second line.

Because of these two factors failing in the second line, I’m wondering if Applescript under Yosemite is is faulty or requires a different method, which I can’t work out.

If someone who is using Yosemite would be good enough to both try and run the script with Applescript and build a new project to test it, I would be grateful to know the results, please.

Regards

Santa


 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 "Move to '* items to shift'") then
delete rule "Move to '* items to shift'"
end if
set newRule to make new rule at beginning of rules with properties {name:"Move to '* items to shift'", move message:mailbox "* items to shift", enabled:true, all conditions must be met:false}
tell newRule
make new rule condition at beginning of rule conditions with properties {rule type:message content, move message:mailbox "* 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.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Why won't this call a method in AppDelegate?
  • Next by Date: Re: Unusual calling script problem
  • Previous by thread: Re: Why won't this call a method in AppDelegate?
  • Next by thread: Re: Unusual calling script problem
  • Index(es):
    • Date
    • Thread