How to find and click on the text in the picture

I found a similar answer, but he didn't give specific steps.

I need a feature like this

I uploaded my macro here a week or two ago.

Why do you need to click on the text? What's the ultimate aim?

Because some programs don't have shortcuts, and image recognition is not particularly accurate, I wanted to click this button by recognizing the text.

Thank you. I will try it.

With respect to @Airy's ingenious macro, this isn't the first port of call when trying to press a button.

Which app, which button?

Can I assume you've tried this?

An editing software "capcut"

I want to click on this row of buttons

Try the Press a button action. If you have no luck with it, there are other options:

  • static mouse click relative to the front window corner
  • found image click
  • AppleScript

If you go the AppleScript route, you can generate a working tell block using this:

1 Like

I agree with you that there are at least 4 options better than using OCR to locate a word on the screen. And I agree that Jone probably should be trying those options. And I thank you for helping him consider better options.

Your approach is useful and appropriate, given the initial proposition of wanting to click "text", but as the target is actually a button, life gets a lot simpler, and the relatively long execution time of something as sophisticated as incremental OCR can be avoided. :+1:t3:

Yes, you are right. And whenever I give advice, I constantly have to decide whether to answer the question directly, or to try to kindly tell them that they may be going down a wrong path. I'm sure at least half of all user questions involve trying to go down the wrong path. But, sometimes, it's better to let the user find out the hard way.

1 Like

This is why the following article gets posted and reposted with such frequency:

It's also why I try to bring people's attention to this notion:

One of the problems I face is when I want to click an image but the background color changes a bit.
In this case, the macro doesn't work as it doesn't recognize the image as the same. Any help?
In such a case, I would prefer to click on the text rather than the image since the text is the same.

For your reference: This is to enable Voice Control on Mac from the menu dropdown.
As the background changes (desktop vs Chrome and other apps), the color of the menu dropdown also changes.

Screenshot 2024-01-05 at 7.04.00 PM
Screenshot 2024-01-05 at 7.04.23 PM

The search function is your friend: