Activate Application without bringing windows to front?

Hi - basically I'd like to activate an application while keeping its windows in the back (maintain their index).

Is this possible?

Hi Joe. Welcome to the forums.

Can you say more about what you mean about ‘activating’ an application if you don’t want its windows to come forward?

I don’t think it’s possible, but I want to make sure I’m understanding what you’re trying to accomplish.

Hi Tj, so a macro that I've setup switches to another application periodically. However, when it comes to the application that it switches to periodically, I don't want it clogging up the most recent applications in my application switcher (the native macOS CMD+Tab). So as a workaround, I cycle back through recent applications in such a way that the application that was tabbed to doesn't end up as the most recent application, but instead the second or third application.

However, in cycling through those applications to reorder them, it brings their windows to the forefront. This adds a bit more delay to the macro, and is visually unappealing. If it only activated the applications in the cycle, without bringing the windows to the forefront, only the menu in macOS's top bar would change, making the cycle faster and more visually appealing.

Hopefully that makes sense.

There's no way to avoid the ⌘Tab issue, at least as far as I am aware.

So let's look at it a different way. What is it that you need to do to/with that other application that it is bringing forward? Do you need to send some information to that application, or are you reading something from it?

Giving us an idea of what you are trying to accomplish may make it easier for people to make suggestions on how to help.