Open a File on a Specific Monitor

I currently have a macro that opens a file using "Open a File, Folder or Application" and then moves and resizes the window to my SECOND monitor using "Move or Resize Front Window".

The problem with this is that when my main monitor is in full screen mode, opening the file causes the main monitor to exit full screen mode.

Is there a way I can open the file directly in my SECOND monitor, without affecting full screen mode on my MAIN monitor?


Hey Yevgeny,

I'm pretty sure there is no way to directly open a given file to a given monitor.

However – you might be able to switch focus to Monitor 2, open the file, and switch back to Monitor 1.

I don't have 2 monitors to test with at present, so you'll just have to give it a try.



You need to first give the target monitor (screen) focus by activating some window on that monitor, or clicking the mouse somewhere on that monitor.

This works for me.
However there is a small risk that the mouse might click on something you do not want it to.

Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.


MACRO:   Set Focus to Selected Monitor (Screen)

-~~~ VER: 1.0    2021-05-11 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Set Focus to Selected Monitor (Screen).kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.

1 Like

Thanks for the response. Unfortunately, it doesn't quite work for me, but I think the problem is with Preview, not KM.

If I use Photoshop to open the image file, your solution works great. But opening the file using Preview still opens the file to the MAIN monitor.

Looking into this a bit, I noticed that Preview has options for assignment (see image below). If I assign preview to Display 2, then that forces preview to open on the SECOND monitor. However, with any other assignment (All Desktops, Display 1, None), Preview defaults to opening to the MAIN monitor, no matter which monitor is active or where I click beforehand or what window is active, etc.

Sounds like I either need to set Preview to default to display 2 or find an alternative to Preview.

Thank you for all of your help! If you have further thoughts, I'd welcome them.