Copy text from OCR and paste it in a field

Hello there,
Just got BTT and already loving it !

I'm trying to speed up a bit my ability to fill up form fields. I want to use only my trackpad.

Here's how I want to proceed :

  • I select the field I want to fill
  • I trigger my hover menu and select OCR screenshot (I use Shottr).
  • I target the text I want to get, on release, Shottr automatically puts it in the clipboard
  • I want that text to be pasted directly in the field I was in

Is it something do able with BTT by any chance? I've tried a few things, but it was unsuccessful...

Thanks for your help !

Hi @Duxb, welcome!

Could you please provide more details? It's hard to help you given the details you've already provided.

Is that a BTT floating menu?

Could you please provide the hovered menu you're using?

Hey @fortred2 Thanks for your answer!

Is that a BTT floating menu?

Yes

Could you please provide the hovered menu you're using?

Sure, here it is.
circular menu.bttpreset (188.9 KB)

  • I trigger the hover menu with a slide up with 3 fingers.
  • The element I'm referring to is called "OCR" (the eye logo).
  • The action linked to that element is the shortcut ⌘@.

Here's a little gif showing the hover menu and the action:
Feb-06-2025 12-24-47

On my example, I'd like to get the text extracted through OCR to get pasted in the search field.

Is it clearer? Let me know if not. And once again, thanks for your time here!

Not ideal, but check this one:

It requires BTT clipboard manager to be used and the "Wait for condition" in my case is "fingers_touching_trackpad" meaning that I'm not lifting my fingers from the trackpack until the paste should happen. This ensures that BTT waits until the OCR is done.

I'll try to come up with better solution later.

1 Like

Thanks for the suggestion! It kind of works if I select "Actions triggered on hover" instead of "Actions executed on trigger", but it's not that great with the circle menu.
If I try it out with "Actions executed on trigger", the app just crashes :sweat_smile:.

If you find a better solution, I'm quite interested. Thanks again for your time!

By the way for me it was also crashing, than I've copied that trigger to another floating menu and now it is not - not sure why. I cannot reproduce the crash anymore.

Just tried with "Actions triggered on hover" and the crash happened.

1 Like

could you send the crashlog to me? (andreas@folivora.ai). It should be available in the macOS console app.

I don't fully understand the issue yet, is the problem waiting for Shottr to finish?

When using the circular menu with a gesture it's always a good idea to hide & trigger it via the "Actions Executed On Touch Release" for the gesture you have been using - but I suspect you are already using this:

No need to add wait for 0 fingers or somilar conditions.

1 Like

btw, I had implemented OCR recently and just made it available as an action in 5.165 alpha

You can now do it like this:

Here is an updated version of your preset without using shottr:
cicular_with_ocr.bttpreset (191.6 KB)

In case you want to continue using shottr, I have also added a new predefined action "Pause Until Clipboard Changes", which makes the action sequence wait until the result is available in the clipboard

4 Likes

Thank you for adding the OCR recognition function. However, why can't the current OCR recognize Chinese? I have tested that English recognition is fine. Please fix it to support Chinese recognition.

Hey @Andreas_Hegenberg thanks for answering!

I just switched to the alpha version and both your solutions work perfectly. I went with the one using Shottr and it's very smooth, love it!

could you send the crashlog to me?

I tried to reproduce, but I can't, unfortunately, don't know what fixed it :thinking:.

Thanks again everyone for your swift help, have a good day!

Sent the report.

1 Like

chinese might now work in > 5.177. If it does not automatically you might need to enter zh-Hant,zh-Hans here:

When I was adding this operation, BTT crashed. After I restarted BTT, clicking on this operation still caused it to crash. I am using version 5.180. The system is also the latest version of Mac.

Now the OCR cannot work correctly. There is only a screenshot in the clipboard and no result of OCR.

I can confirm that the crash also happens on macOS 14.7.2 (23H311)

Mhh I can't get it to crash, did it immediately happen after you added the action? Or after entering something in the config?

I think I found the issue. Should be fixed in 5.181 (uploading now)

Thanks very much. Now it can be used well and can also recognize Chinese.