C-Command Software Forum

Apple Mail Sane Box - Script Error

Hi there,

I saw this pop up on my screen earlier. I’m wondering if the script is not running correctly.
Please could you look at it?

I can send you my mail script if you wish.

Kind Regards

Screenshot 2017-08-14 19.05.16.png

It could be a problem with the script or with your macOS installation. Which version of the OS do you have? Could you send your script? Does the same error happen when you run it from Script Editor?

Hi Michael,

I am on 10.12.6

here is my script.

Apple Mail - SaneBox.app.zip (63.5 KB)

Does the same error happen when you run it from Script Editor? I think the problem may be that you saved the script as an app, but the app isn’t trusted by the system. You may need to go into the Privacy pane in System Preferences and add the app to the Accessibility list so that the system allows it to use System Events.

When I run the script, I just get “” in the description pane. See attached image.

I will try the privacy pane that you suggested and see how I get on.

Thanks again Michael for your help and consideration.

Screenshot 2017-08-14 21.25.37.png

I think that’s a sign that the problem was what I described above, since the same script works when run from Script Editor.

Since I added the app to the accessibility list, the error has not reappeared so hopefully, that was the issue.

Thanks again as always for your support and advice

One very last quick query. In the script, where it lists the mailboxes you want SpamSieve to search, I noticed that the Inbox is not included. I’m assuming SpamSieve knows to check that and is asked to do so separately. Is that correct?

Kind Regards

Yes, the regular SpamSieve rule in Mail will check the inbox. The script is only necessary for the other mailboxes because Mail does not auto-apply rules to them.