Using KM with remote access to a headless Mac

I've tried following different tutorials that involve pixel color and and image search and I never get the expected results.

For example, if I use the Get button on the pixel color condition, it gets the correct x/y but the color is wrong. If the mouse is over a colored background, KM retrieves gray.

Could this be because I'm using remote access to a headless Mac?

Is KM running on the machine that is physically beside you, or is KM running on the machine that you are remoting into?

If you are seeing colours with your eyes, I'm perplexed why the colour returned by the Get button is wrong. I rarely use the Pixel condition because I just don't find it as reliable or as quick as the Find Image action. You should test to see if the Find Image action works.

The other thing I would try to do is open the macOS utility called Digital Colour Meter. I would move the mouse over the target area and examine the RGB colour values over the pixels in question. In theory, instead of using the Get button, you could enter the actual numbers of the RGB values on this page which you get when you click on the colour button to the left of the Get button.

1 Like

KM is running on the machine that I am remoting into. The physical machine is Windows.

I'll try entering the RGB values from Digital Colour Meter. But if KM can't get the right color then it won't matter if I enter the correct values.

I watched and followed several videos showing the Find Image action and it never worked.

I see. That's the opposite scenario that I was expecting (and hoping for.) This introduces problems. For starters, there is no display on the remote Mac, so I'm not sure what the KM Engine will do when it comes to actions, triggers and functions that rely on the screen, such as the Get button which you say you can use.

I can't test your scenario. I think this will require someone with more knowledge about running Macs heedlessly than I have. I tried googling whether the KM Engine will run without a display, and I didn't find any recent, definitive answers.

Similarly, it's not just the Engine I'm concerned with, I'm also surprised you got the KM Editor to work at all. The remote access software that you use has to translate some really tricky hotkey and mouse signals from the Windows machine to the Mac. If you are trying to use the Editor on a Mac using a Remote Windows Desktop, that could have a lot of technical issues. I'll leave it to the real wizards to help you out, as I'm just a wizard in training.

That's another road you can take, or another ticket you can open here. I've called the Find Image action millions of times in my life, and it works over 99% of the time.

This might be a longshot, but have you tried to run the macro with difference display settings on the Mac? I know it's headless, but are you able to still set the "display" at different resolutions and/or Color profiles? It might help to enable "Show resolutions as list" in the Advanced Display settings.

Also make sure Night Shift is turned off.

And if it's an option, can you connect the Mac to a monitor, set the Display settings to something, then disconnect the monitor and see if it makes a difference? If that "initial" display setting sticks, maybe it'll help.

This. Also, depending on the Mac, you might have to add a "dummy" HDMI adapter to spoof a proper display.

What's the Mac, and what OS is it running?

Mac Mini M1. Latest OS.

I hooked up the Mac to a monitor and I still get the same results.

To check if it is user error, I tried the same macros on a Macbook and they were fine.