adding a new rule to Mail
adding a new rule to Mail
- Subject: adding a new rule to Mail
- From: Oliver Moran <email@hidden>
- Date: Sat, 21 Feb 2009 21:03:07 +0000
Hi,
I have written a script for a rule in Mail. The purpose of the script
is to scan in-coming mail and modify the mail subject as necessary.
This all works fine, but I would like to have an "install script" to
add the rule to mail automatically. What I have is the following:
tell application "Mail"
set new_rule to make new rule at end of rules with properties
{ name:"New Rule", all conditions must be met:true, AppleScript:"/path/
to/apple/script.applescript" }
tell new_rule
make new rule condition with properties { ... }
end tell
end tell
This 'compiles' fine and executes perfectly except that it does not
add a "Run AppleScript" section to the rule in Mail.
Is the syntax correct? Does "make new rule at end of rules with
properties" need additional properties to add the AppleScript to the
rule's actions? Or is this feature disabled to AppleScript (presumably
for security reasons)? (The script does not return an "Access Denied"
error as it does if I try to say "tell new_rule set hidden to true".)
Many thanks in advance for your help,
Oliver
_______________________________________________
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