C-Command Software Forum

Outlook - Filter Mailboxes: “Application isn’t running” Error

Using Outlook 2016. Have installed the script Outlook - Filter Mailboxes.
First execution works great. It filters through the Inboxes and moves Spam correctly.

Then on next scan it gets an error:

Application is not running
System Events got an error: Application isn’t running. (-600)

Any ideas about why the script is failing?

If I quit the script and restart it works the first time, but always fails when left open.

Running OS 10.11.3

This looks like an OS bug to me because I don’t think System Events should be failing. It might help to change:

tell application "System Events"
    if not (exists process "Microsoft Outlook") then
        my debugLog("Outlook is not running")
        return
    end if
end tell

in the script to:

if application "Microsoft Outlook" is not running then
    my debugLog("Outlook is not running")
    return
end if

Let me know if that helps. Or, if you don’t understand how to make the change, I will try to make an updated script tomorrow.

Didn’t work - got syntax error
Expected class name but found identifier.

Perhaps the text wasn’t pasted in quite the right place. Please try the updated version of the script that I posted.