Get Screen Area Function Gone Haywire

I've been using this macro for a while with no problem but now no matter what I do it always captures from my main monitor instead of the coordinates I set. I used the Mouse Display window to set the area myself but no luck.

This is one of several strange things that's happened since I've switched which monitor is my main one and hidden the menu bar; maybe it's one of those. The get feature no longer works, it gets Y wrong and I have to use the Mouse Display to get the actual number.

I feel like I'm missing something obvious (as is usually the case) but I'm stumped. Anyone know what's going on? I've attached the macro in question, it's just two actions.

Screenshot.kmmacros (2.3 KB)

Are you using KM 10.0.0 or 10.0.1? Try 10.0.1. If that doesn't work, read this thread....

1 Like

Thank you! I'm on 10.0.1 but I"ll take a look at the thread.

After checking the thread I can say that I'm also having that problem but it's not the only thing going on. I tried setting the shortcut to capture all screens and I only get data from one monitor.

Is there a reason KM might not 'see' my secondary monitor?

Try capturing just your second screen as a test. I think that's probably done as follows:


I think it could help to test this, to see if the problem is that the 2nd screen is not detectable.

Hey @peternlewis,

Looks like more troubles with the GET button.

I'm guessing they're related, but it looks like there's some new behavior here.


When it's set to 'screen with index 2' or 'second screen' I still get a screenshot of the same (main) screen.

Ok, let me install my iPad as a second screen and see what happens.

Ok, done. It captured my second screen.

I have a potential clue. When I installed the second screen, the action changed to allow me to choose a number or the phrase "second screen." Do you see that? Why not try that instead?

While you try it I will contemplate further.

Thank you! I really appreciate all the help everyone. Let me know what info or testing I can do to be useful and I'll get it done.

Try my advice in the post above. Here are my results:

  1. All Screens - works, captures all screens!
  2. Main screen - works, captures my iMac screen
  3. Second screen - works, captures my iPad screen (which is my second screen using SideCar)
  4. Internal screen - captures my iMac screen, but displays an error, but doesn't fail
  5. External screen - captures my iMac screen, which I think is an error
  6. The Front Window's screen - works, captures whichever screen has the active front window
  7. Back screen - I don't know what this word means, but it captures my iMac screen
  8. Screen with mouse - works, captures whichever window has the mouse
  9. Screen with index - works, captures either main or iPad window depending on if I specify 1 or 2
  10. The front window - works, captures only the front window

There were a few more items but I didn't test them. They didn't seem important to test right now.

Okay so I'm just gonna lead with the fact I screwed up and I'm sorry but I got it working and here's what I know:

After testing every single variation in your list and getting one part of my main screen every single time (not even the main screen, just one part of it over and over) I figured something else was going on on my end.

After testing for a bit there seem to have been two things getting in my way. First, the hotkey I was using might have a conflict with something else in my system because it wasn't firing consistently. Changed that.

The major problem though, seems to have been in the 'Write System Clipboard to file' action. I added '.jpg' to the file name there and it's working again; I'm certain I never had it on there before but considering the mistakes I've made so far I wouldn't bet on it.

So I think it was copying all the right stuff to the clipboard all along but then only saving part of it to the picture file. I'm not sure but it is working now.

Anyway I'm really sorry for the extra work and making so many mistakes but I appreciate the help so much and it did help me fix it and find out about the bug that was driving me mad.

Thank you again and sorry again!

No need to be sorry, but thanks anyway.

Similar things have happened to me before. In fact just today I thought that a screen capture was failing, but I had neglected to write the current clipboard to a file. Using a methodical, meticulous approach usually solves all problems.

There are a few fundamental debugging techniques that usually are 90% effective but that most people fail to follow.

  1. Try everything twice. Always. No matter what it is.
  2. Try rebooting (or at least restarting the apps in question.)
  3. Explain the problem to a peer. The very fact of explaining it may make you realize the problem/solution.
  4. Reduce the problem to the simplest thing that still fails.
  5. Try it on another computer, if you have one. This is an example of component substitution, and this point could be expanded to include software substitution.

If you look at my original list above, items 4 & 5, I may have discovered an error or two in KM. @peternlewis ?

Thank you for the list, it is very useful! I can think of a time when each one of these (and usually some combination of them) saved me after many hours of frustration.

I set up a new macro to test your list out from scratch and I got all the same results except for:

I get an error but it does actually fail for me.

For me this captures the screen that is not active so my guess is that it means the screen that is not the front/active screen in a setup with two monitors.

The Y coordinate in the Get facility is inverted in version 10.0.1.

It will be fixed in 10.0.2.

Sorry for the hassles.

In the mean time, you can use the Mouse Display to get the coordinate, or subtract the result from the main screen height.