Sending Keystrokes to hidden applications?

Possible? Currently I’m only aware of being able to “activate” an app, which brings it to the front, before sending it a keystroke. I’m trying to send the same keystroke to multiple apps and it’s bothersome to have them kind of tab between each other.

No. It isn’t possible. Keystrokes are part of System Events and it just does them in the frontmost window regardless. The only way you can do stuff to windows that aren’t frontmost is to specify menu clicking, setting text in fields, etc.

Gotcha, anyway of tricking System Events into believing something is frontmost when it isn’t ?

This is one of those, “What part of no didn’t you understand?” moments… :confused:

No, the processes in System Events have a frontmost property, which has a boolean value
Either a process is frontmost or it is not

I was simply looking for a work around, next time I’ll just give up before I even post, would that better suit you?