Image to text function

Get help with using AutoHotkey and its commands and hotkeys
Dosis Chris
Posts: 7
Joined: 10 Sep 2018, 05:12

Image to text function

13 Sep 2018, 17:51

I m making a script that captures an image that the user dimensions to finally investigate for characters (letters, numbers, etc.) and convert them to text and place them in clipboard. The first part is done although the crucial part is obviously pending because I m not aware if and how AHK can help me convert image to text. With a brief search on the internet I've found that some users have made their custom libraries but probably they are outdated and too buffling for a new user like me. Others claim that in their main script they call an external program to do the text recognition, but my goal is to keep my script simple and light if possible. Could you help me on this?

Thank you.
bordop
Posts: 10
Joined: 03 Jun 2018, 23:03
GitHub: bordop

Re: Image to text function

13 Sep 2018, 18:41

Have you seen the FindText thread? It is a fantastic utility and I think reading through it might get you pointed in the right direction.

https://autohotkey.com/boards/viewtopic.php?t=17834
Dosis Chris
Posts: 7
Joined: 10 Sep 2018, 05:12

Re: Image to text function

13 Sep 2018, 19:04

bordop wrote:Have you seen the FindText thread? It is a fantastic utility and I think reading through it might get you pointed in the right direction.

https://autohotkey.com/boards/viewtopic.php?t=17834
Yes thank you this is actually the first thread I came across but the problem is that - if I m correct - I have to run their script first, designate the search area for the text to be found and using FindText() on my own script, search for the text previously found (something like ImageSearch function) . This defeats the purpose of my scripts existance whitch is not what I want. I want the script to recognize the text and store it to clipboard not to search its position. Although Im sure that examining their code will help me alot is there any other piece of code you can point me at?
Dosis Chris
Posts: 7
Joined: 10 Sep 2018, 05:12

Re: Image to text function

24 Sep 2018, 16:01

I finally found what I was looking for!

After a bit of research I found the tesseract.ahk ocr library - that was the easy part - :D . Took me a lot of time to finally get how it works and most importantly how to implement it to my script, which I did minutes ago. This is working pretty well so far (almost 90% success over fairly weird looking fonts) and I definitely recommend it to anyone interested in text recognition using AHK.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], CluelessHotKeyUser, Google [Bot], helming, mikeyww, omareg94, songdg, yumuffin and 42 guests