How to check if window with a specific title of background application does NOT exist?

We’re using Zoom for video conferencing. I want to change my status in Slack automatically, when a meeting ends. The Slack part is no problem, but the part ‘if Zoom running, but no meeting is ongoing’ I can’t figure out.

When a meeting is running, the title of the meeting window is ‘Zoom Meeting-ID: XXX-XXX-XXXX’ (X = Numbers).

I want to check if such a window does not exist, without making Zoom the frontmost application.
Problem is: Zoom always opens another window at launch, that has its own different title. This window might might be there, or not.

I can only find window conditions for ‘any window title’, which does not go well with negative matching, because of the second window. I would need ‘if no window title’ …

Any ideas how to achieve this?

Second window or not, if the window whose non-existence you want to check always contains the words "Zoom Meeting," and the second window doesn't, is there any reason an If Then Else action like this wouldn't work for you?

(using Finder here because I don't have Zoom installed, but the principle should be the same)

That was my first idea, of course, since I already use the ‘positive’ check to set my Slack status, too. So my check is running every minute. But I don’t want to call the Slack API every minute if the status didn’t change, therefor I split the checks in two.

Maybe I should just use a flag variable in KM that I can set and use as a second condition before acessing the API … :thinking:

Okay, that makes sense, but it also sounds like a significantly different question than your topic title. If Then Else window title checking has nothing to do with how frequently it's checked; that's a matter for triggers. I'm afraid I'm also unsure what you mean by splitting the checks in two; uploading your macro or posting a screenshot of it would be a big help in figuring out exactly what issue you're running into.

Just to make sure, you are aware that you can set more than one condition in If Then Else actions, right? So whether you try your flag variable idea, or whatever check you use to set your Slack status, maybe it would work if you combined them? Example with flag variable:

Either way, good luck getting this resolved!

I did not combine the two conditions, but put the variable inside of the window title condition, because I need to know which of the conditions is true/false to set the variable (or it would never be set).

Here's what I ended up with:

1 Like