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
|