[Feature Request] Move cursor to found text

Moving the cursor to a found image is basic, but what about when you are searching for dynamic text on a web page?

Cmd-F will find the text, but then how would I get the cursor to a found text example?

I intend to use this on a website where I want to hover over some found text and activate some functionality only available when hovering.

It could be a Chrome feature only or any program that supports Cmd-F like TextEdit

1 Like

no ideas? Did I stump you guys? Need more info?

Yes, apparently you did stump us. I can’t really see how this could be done, and judging by the lack of responses, nobody else can think of a way either.

Sorry!

There is generally no way on the Mac to know where the text selection is.

On a web page, you may be able to determine it and you might be able to map that to a coordinate in the page, which you might be able to map to a coordinate in a window which you could then click on. But I have no idea how to do any of this or even if it is possible.

You might be able to detect the selection with an image capture and clever image processing. But not natively in Keyboard Maestro (well, ok, you could scan through pixels, but it’d take a very very long time - Keyboard Maestro is not the tool for pixel processing!).

Hi, Peter,

I was Googling for a solution and this answer over at StackOverflow may provide a clue of some use.

I’ll be frank: I have no idea if this SO answer is relevant, so if it’s not, I apologize for the waste of bits and time.

/Bill

I have tried that technique. In my testing, NSAccessibilityFocusedUIElementAttribute does not work reliably in general unfortunately.

I have the search for word / text in Safari as set up in this video. Do you mean this @kraftyDevil?

11)Word.kmmacros (31,2 KB)

Thanks @appleianer - this works for some cases but not all of them. I’d definitely prefer a programmatic solution rather than a visual one because of how dynamic text can be.