I want to be able to 'Pause Until Pointer Is Not Spinning Beach Ball'. Is this possible with existing tools?
It depends what you mean by "existing tools". There is a macOS command called screencapture which has a parameter called -C which lets you capture the cursor (now I'm assuming that cursor means pointer here, but I'm not sure. Most people confuse those two words. Technically the cursor is the flashing text bar while the pointer is the mouse icon. What you want is to capture the mouse icon. I just gave it a test and it DOES capture the pointer.) If you search the captured image, instead of the screen, for the spinning ball, then YES you can actually achieve this. Have I pointed you (no pun intended) in the right direction, or do you need help writing this macro?
Keep in mind that the user can hold the pointer on the edge of the screen which means only a HALF/QUARTER of the spinning ball may be visible. This will complicate the macro quite a bit (if you want to account for this.) Also, do you need to account for multi-monitor setups?
It Looks like Keyboard Maestro's own Screen Capture action does not have the option to capture the cursor.
Am I missing something?
If not then please consider adding the option.
Given this thread's task – it would be possible to capture the area around the cursor and not have to search the whole screen.
If we had the ability to create/define our own actions, we could do this without Peter's involvement. Maybe KM 11?
There is no apparent API to screen capture with the cursor.
I suspect the
screencapture utility uses some private undocumented flag to include the cursor, or alternatively maybe it uses some other API entirely.
You can already make your own plugin actions. Good luck with that though, read this article for an interesting discussion on some of the things that have to be done to reimplement screencapture:
It's amusing too because some of those things are the things that go on in the Prompt for Screen Rectangle action, and I'd love to have access to some of those private APIs for controlling the cursor.
I always appreciate/treasure your replies, even when I'm proven wrong or embarrassed but the fact that I didn't know something about KM (like plugin actions, which I obviously need to read up on.) And when I read the article you cited, I learned that you can hold down the space bar while taking a screen shot in macOS. That's quite a revelation, although I'm not sure I will need that very often.
I told you one way to do it with screencapture. I actually said "YES" in capital letters. I tested it and it worked for capturing a pointer. I presume the spinning ball pointer will also be captured, but I couldn't generate a spinning ball because I have an M1 Mac which is so fast it disproves Kurt Godel's incompleteness theorem. (The part about Godel was sarcasm.)
Or are you wanting KM to be able to do it with an action? Peter said KM can't because there's no API to do that. In my opinion, he doesn't need to use an API function because, in my opinion, shell commands are supported API interfaces. But it's his choice. Yet he'll probably chime in here and tell me why I'm wrong.
I did point out to you a couple of problems with my solution that you didn't answer. E.g., I asked you if you are worried about what happens if the user moves the mouse off-screen and then you can see only half or a quarter of the spinning ball. You didn't answer. Does that mean you don't like my solution?
Perhaps what you want to know is whether an app is "not responding" or not. The spinning ball is not the only way to detect that. But that's the way you worded your question. If I have correctly described what you want, I think there's a long thread about this topic, but I couldn't find it right now. Is that what you are really after?