C-Command Software Forum

Outlook Has issues with Filter Mailboxes script

I’m having issues with Outlook 365 and the Outlook - Filter Mailboxes Script. Upon startup, the script does not initially work (i.e., emails go into SpamSeive Inbox and stay there) and if I select the Filter Mailboxes script, I get this error “The variable gSecondsBetweenChecks is not defined.” I then dismiss the error and restart the script and it (appears) to work as expected. I am running the latest version of Outlook (not the new one) and the Monterey public beta.

any suggestions?

I haven’t seen that error before. What does it show if you run this script using the Script Editor app?

tell application "SpamSieve"
    lookup single key "OutlookFilterMailboxesSecondsBetweenChecks" default value 1 * 60
end tell

Have you tried downloading a fresh copy of Outlook Filter Mailboxes?

Running the script yields “60”. I have redownloaded a fresh copy of Outlook Filter Mailboxes - multiple times in hopes of that resolving the issue to no avail.


When you say that you “select” it, do you mean clicking on the OFM application icon in your Dock, or are you using a menu to run the non-app version of the script?

Also, which build number of Monterey are you using?

By select, I mean the application icon in the Dock

And the Monterey build is 21E5227a (but the behavior was previous with previous builds as well)

Thanks. I have not been able to reproduce the error on that version of macOS. However, I have updated the script to try to work around it.

Downloaded updated script. So far so good. Thanks

1 Like

I spoke too soon. Script does not work unless I execute with Script Debugger. Does not operate at all if I activate from the Dock

Please use the Save Diagnostic Report command in the Help menu and send me the report file, as described here right after you try to run it from the Dock.

Thanks for sending the report. I’m glad to hear that resetting the privacy database using tccutil reset AppleEvents allowed macOS to prompt you for access to control SpamSieve so that the script could run without error.