applesriptを使ってメールにルールを作ろうと思っています。
送られてきたメールにtestと書いてあればtest.scptが動くようにしたいです。
インターネットで調べ、ここまで書きました。これを実行するとルールはメールに追加されるのですが、scriptが選択されません。どうすればよいでしょうか?(test.scptはcom.apple.mailの中に入っています。)
set applicationScriptsFolder to (path to library folder from user
domain as text) & "Application Scripts:com.apple.mail:"
tell application "Mail"
set newRule to make new rule with properties {name:"test rule", run
script:alias (applicationScriptsFolder & "test.scpt")}
tell newRule
make new rule condition at end of rule conditions with
properties
{rule type:message content, qualifier:does contain value,
expression:"test"}
end tell
end tell
あなたの回答
tips
プレビュー