To use it in sharex instead of the usual OCR, you must:
- Install Node.js 18+ or Bun.sh (and don't forget to select "Add to PATH")
- Download this repository
- In the folder, type
npm install
orbun install
(depending on what you are using) - Open ShareX Settings and go to Task Settings.
- Go to the "Actions" tab and click "Add..."
- Fill out the form as shown in the screenshot (do not forget to change the paths to your own)
File path
- path to Node.js or Bun.sh exe file
Arguments
- path to ya-ocr folder + "/sharex.js" at the end
-
Save and make sure that the "ya-ocr" checkbox is selected
-
Now you can use your hotkey to capture a region and it will OCR it using Google Lens API (once it shows screenshot on your screen, text should be copied to your clipboard).
-
In the "After capture tasks" settings, enable "Perform actions"
- Done