I have a Mac mini running headless. Since this is running 24x7 I was thinking to install keyboard maestro on it and do some automation. Some of these automation’s involve taking x and y coordinate of the screen to click a button. While I am making the automation, I can do that. My question is, when the Mac mini is running headless how will it get its quardinates for running GUI based automation’s.
macOS is drawing a “screen” even when the Mini is headless, you just don’t see it since there’s no display plugged in. So your KM macros should still work.
One caution: if you unplug a display, the screen resolution often changes which can change x, y coordinates. If you’re accessing the headless Mini only thru VNC (e.g. Screens, Jump) and not using a physical display, this shouldn’t be an issue because you won’t be un/plugging a display.
Do I need to set resolution if using screens ? What if I make the macro while connected to a physical monitor and then disconnect from it.
Window locations and therefore x, y coordinates may be unpredictable whenever you unplug the display.
Can you use other KM actions that don’t rely on X, Y coordinates? Some options include:
Press a Button
Select a Menu Item
Just a random note - I had some automations that would do things like this and would run for hours at a time (programmatic interaction with a GUI), and in that situation KM didn’t manage memory well. At all. Even if the automation wasn’t running, I’d see KM with gigabytes upon gigabytes of memory allocated to it - and it was basically crowding out other stuff.
I realize this is a bizarre use case, but just noting in case you’re planning to do something along those lines - you’d probably need to get in occasionally and restart KM.