Can Autohotkey detect a text at a certain coordinate?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
KazNaka
Posts: 9
Joined: 07 Jun 2023, 16:22

Can Autohotkey detect a text at a certain coordinate?

Post by KazNaka » 07 Jun 2023, 16:29

Is it possible to tell a script this: while "word" is NOT found at some (x, y) coordinates of a PDF document, press {this key}, else break?

User avatar
boiler
Posts: 16768
Joined: 21 Dec 2014, 02:44

Re: Can Autohotkey detect a text at a certain coordinate?

Post by boiler » 07 Jun 2023, 16:52

If you mean the PDF document is displayed on the screen such that word will appear at a certain location on the screen or at a certain location within that window, then yes, it’s possible. It would most likely require using one of the several OCR libraries that have been published, and I believe at least one supports AHK v2.

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Can Autohotkey detect a text at a certain coordinate?

Post by malcev » 07 Jun 2023, 21:27

You dont need ocr for searching in pdf.
There are several libraries that can do such a task, for example:
https://stackoverflow.com/questions/4740157/how-to-find-x-y-location-of-a-text-in-pdf

Post Reply

Return to “Ask for Help (v2)”