Send a key code to an application without activating it first?
I don’t think you can send a keystroke to an inactive application. But you can hide an app immediately after activating it and executing code for it. This does however, cause the app to briefly flash before it hides, unless the app is running in fullscreen. tell application “System Events” tell application “X” to activate … Read more