A Macro That Can Temporarily Change a Cursor?

I need to do some testing on an app that involves checking the size of elements. Just a rough test to begin with and then if something looks to fail, I can get more detailed.

I want to trigger a macro that temporarily changes the mouse cursor to an image that I define and then switch it off. I have searched the existing macros for 'cursor' and get no results. Is there a way that I can achieve this, do you think?

Note that I want to be able to run this regardless of what app might be running (will be using to test web apps, native apps).

Thanks

This is all I could find that might be relevant by searching the KM Forum for "pointer":

1 Like

How are you checking "size"? IIRC there's been a few macros posted that would allow you click points A and B and get the pixel distance between them, the size of rectangle they create, and similar.

It would be nice if you could switch your pointer to/from a "template image" on the fly, for instant comparisons, but Apple have made that kind of customisation harder and harder. Last utility I can remember for such is Mousecape, which we used to recommend to lefties, but it hasn't been updated recently so I don't know if it will work on Ventura or with Apple silicon.

1 Like

Basically, I want something that runs like this bookmarklet:

https://adrianroselli.com/2022/05/24x24-pixel-cursor-bookmarklet.html

Which overlays an image in place of the cursor. But the bookmarklet is a web browser only thing, while I would like to use this on any app.

As for Mousescape, I would give that a go but I'll be honest I have no idea how I actually run it. I am not clear from the readme how it's supposed to work.

If you are happy with a square or rectangle, you could try something like this -- not ideal, but an approximation of what you seem to be after. As set, press F8 to trigger and keep that key held down to maintain the (unfortunately flickering) rectangle as you move the pointer around:

Rect by Pointer.kmmacros (2.4 KB)

Image

An alternative method would be to trigger the macro, pop a prompt asking you for X and Y dimensions, then run the "Repeat" until you hit a certain key (eg Esc).

I usually prefer the Target shape for tasks like this:

image

** Hold down the hotkey trigger for continuous display (at least on Mojave).


Download: Draw Target Around Mouse Pointer v1.00.kmmacros (1.8 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

I'm assuming (probably wrongly!) from the description that OP is rough-testing sizing within a box model, hence the rectangle.

1 Like

Correct, needs to be a square :slight_smile:

That's cool, I had no idea that was possible.

1 Like

Perfect - this is what I need. I did search for cursor macros but this one eluded me as it's not labeled as a cursor macro. But this is precisely what I am after.

Partly because it is a *pointer*, not a cursor -- a cursor indicates where text input will be inserted.

Yes, the terms are often used interchangeably. But knowing the difference adds to your google-fu, especially when searching for more technical answers.

1 Like