Is There Any Way to Send a Keystroke or a Mouse Click to an Inactive Window?

Hello, I'm kind of new on Keyboard Maestro.

I would like to ask is there any method that can send a mouse click or send a keystroke to an inactive window without interrupted an active window?

For example:

I'm working in Photoshop. and I want to repeatedly send a keystroke F5 or repeatedly click at coordinate x100 y100 on the inactive Firefox window.

Sorry for my bad English. :pensive:

Hey @Chatt_C,

Welcome to the forum!  :sunglasses:

See this:

Note carefully the Send-To options of the pop-up gear menu of the action.

You cannot click something you cannot see.

I presume you don't want to bring the window forward. If the window is visible you might be able to Click using the Move or Click Mouse action.

Using Safari, Google Chrome, or one of their suitable offshoots you can use a Execute a JavaScript in Front Browser action to do many things.

The caveat is that the browser must support AppleScript and sending JavaScript via Apple Events.

Firefox fails in this regard.

-Chris

2 Likes

Thank you so much for sharing this, Chris.

1 Like