In Mac email rule, I try to run javascript instead of applescript. This was set in Mail Rules using JavaScript to automate instead of AppleScript , but the answer does not work for me!
I tried to simplify the code as much as I can. So, the following applescript works just fine:
on perform mail action with messages theMessages say "running!" end perform mail action with messages
but equivalent javascript is not working.
function performMailActionWithMessages(messages) { app = Application.currentApplication() app.includeStandardAdditions = true app.say ("running") }
Edit Here are my rule options


source share