Automating MS Teams Set Busy status

MS Teams is known to be problematic for trying to automate things like status. So I'm trying to use KB for simplifying that task, and have run into issues. Maybe someone has another thought on how I could attack this, or has a better macro.
I use Spaces and have MS Teams running in Space 2 so my macro essentially moves to Space 2, activates MS Teams, clicks the little picture, and does the keystrokes to open up the menu and select the Busy status. And I have to put in many pauses in order to not overwhelm the actions.
This all works fine, but then sometimes that window is not positioned exactly where it needs to be, and the Move and Click doesn't hit exactly, making the whole macro worthless. I try not to move that Teams window at all. (Sidenote: maybe I should have another macro that always positions that window to the exact location).
Any other thoughts on how to perform this function?

Copy of current macro:


Have you tried keyboard shortcuts? There may be a better way to activate the Teams "Search" field, but until you find it:

  1. Keystroke "⌘F" to activate the Search field
  2. Keystroke "Esc" (escape) to cancel the find, which leaves the Search field active
  3. Type the string "/busy%return%" (or use an actual Return instead of the token, or do a separate keystroke ":leftwards_arrow_with_hook:" action)

...and enjoy being undisturbed (assuming anyone takes any notice!).

1 Like

Wow! I did not know that I could set status via the search field. Major simplification of my macro now. Appreciate it!!

No problem!

And I've now remembered -- it's ⌘/ to activate the Search bar and put the "/" in, so you can make your macro even shorter. (I gave up setting my status ages ago when I realised nobody cared...)

You should even be able to build a "toggle status" macro using image detection on the account icon, top-rightmost of the Teams window... Hmmm, perhaps I'll go back to setting status now.

1 Like

This thread got me thinking... and I'm working on some macros now to change status but this can be accomplished even while Teams is in the background in the following manner:

Set Status to Busy in the Background Screenshot (click to expand/collapse)

It's not very elegant but it gets the job done without Teams having to be at the forefront.