My macros are not designed to manage Desktop Spaces; they are really to use them more efficiently.
During the development of those macros I did learn a lot about Desktop Spaces and I tried to share all of the important information within that post. So even if the macros don't meet you needs, you might find that information helpful.
With that said, if, after reading the information on that post, you have any questions feel free to ask here our within the thread.
Not with my macros. With them, it's assumed the Desktop Spaces are already created.
I don't think there is any scriptable way to create a new Space, at least I haven't found one. AppleScript can't do it, Shortcuts can't do it. There is no way to assign a hot key to creating a new Space in the keyboard shortcuts preferences.
You can do "Activate Specific Activation" and open Mission Control, that brings the view up with all the Spaces where you click the + sign on the right to create a Space, but once that view is open Keyboard Maestro mouse click events don't seem to work.
Thanks every body for the help. I am making progress with this.
Using Monterey 12.2.1
First I just learned that I can create an extra space and it will remain even past reboots. Nice.
So I have a I have a macbook and external monitor. (Desktop 1 and 2). I created a new space (Desktop 3).
The basic idea is to have desktop 1 and 2 used for daily work and the desktop 3 be used for non work like social media apps etc.
So I have a KM Macro that opens several finder windows and Apps for daily work on desktop 1 and 2.
New - then I added a new macro that types types CTR shift 3 (my key mods) to go to the new Desktop 3 and open other apps in this window.
All works great.
Currently, when I use "command – tab" to jump to various applications, when I choose an application that is in the new desktop space 3, I was thinking it should automatically jump to that Desktop space and activate the application but it does not. Also if I am in space 3 and choose an app in space 1 or 2 it does NOT jump either.
Q: Is there a way I can get the Mac to automatically jump do the application (CMD-TAB) no matter what desktop space it is in?