I would like to create a macro that moves focus to space 4 and opens 2 new finder windows.
I don't know how to begin, can anyone give me a hint?
Well, @peternlewis has said many times that since Apple did NOT provide an API for Mission Control Desktops (Spaces) that KM is unable to automate Desktops.
However, using the keyboard shortcuts that you have assigned to each Desktop in Mac > System Preferences > Keyboard, there are a few things you can do.
For more info, see How to use Spaces (Desktops) .
Here is a Macro to get you started. It uses CTRL-4 as the shortcut for Desktop 4, so if you have a different shortcut, you will need to change the first KM Action.
In a simple test, this worked for me.
MACRO: Control Mac Desktops (Spaces) [Example]
~~~ VER: 1.0 2019-10-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:
Control Mac Desktops (Spaces) [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.
Does this work for you?
That worked just fine.
Here is my Macro:
I know it’s Danish hope it makes some kind of sense anyway.
Venlig Hilsen/Kind Regards