Vis2 - OCR()

Post your working scripts, libraries and tools
iseahound
Posts: 119
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Re: Vis2 - OCR()

06 Jan 2018, 18:13

BoBo wrote:.


I'm unable to reproduce the errors you encountered. For testing, I typically use the following procedure.

1) Add #^w:: MsgBox % OCR("Untitled - Notepad") to the script and run it.
2) Open a new notepad window.
3) Type some things in the notepad window and press #^w.

The text in notepad should be equal to what the MsgBox displays.
BoBo
Posts: 1884
Joined: 13 May 2014, 17:15

Re: Vis2 - OCR()

06 Jan 2018, 19:00

iseahound wrote:
BoBo wrote:.


I'm unable to reproduce the errors you encountered. For testing, I typically use the following procedure.

1) Add #^w:: MsgBox % OCR("Untitled - Notepad") to the script and run it.
2) Open a new notepad window.
3) Type some things in the notepad window and press #^w.

The text in notepad should be equal to what the MsgBox displays.
Thx for that quick response. I'll go to bed now (01:00AM here) but will do some further testing. Stay tuned 8-)
songdg
Posts: 27
Joined: 04 Oct 2017, 20:04

Re: Vis2 - OCR()

08 Jan 2018, 04:49

iseahound wrote:
songdg wrote:If it is possible to conbine the syntax text := OCR("C:\image.png") and text := OCR([0, 0, 430, 150]) to scan an image file in specific region.


I just updated a new version on my GitHub. Redownload it please.

Code: [Select all] [Download] GeSHi © Codebox Plus

    #include Vis2.ahk
MsgBox % OCR("https://i.stack.imgur.com/sFPWe.png", , [0,120,999,999]) ; [x, y, width, height]

^ There is a blank parameter, that is for a feature I have not created yet.

Thanks,I've tried your new version,but it seems no response.And I've been installed tesseract-ocr4.0 in my pc,is that the reason.
iseahound
Posts: 119
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Re: Vis2 - OCR()

08 Jan 2018, 05:39

songdg wrote:.


Could you tell me what you are doing, and what the result is? If you have some code that is not working please show me. Otherwise the above code should work, I just double checked it.

This line of code

Code: [Select all] [Download] GeSHi © Codebox Plus

MsgBox % OCR("https://i.stack.imgur.com/sFPWe.png", , [0,330,999,400])

should say: brown dog jumped over the lazy fox.
songdg
Posts: 27
Joined: 04 Oct 2017, 20:04

Re: Vis2 - OCR()

11 Jan 2018, 02:14

iseahound wrote:
songdg wrote:.


Could you tell me what you are doing, and what the result is? If you have some code that is not working please show me. Otherwise the above code should work, I just double checked it.

This line of code

Code: [Select all] [Download] GeSHi © Codebox Plus

MsgBox % OCR("https://i.stack.imgur.com/sFPWe.png", , [0,330,999,400])

should say: brown dog jumped over the lazy fox.

I didn't known the reason why,perhaps I should tried it on another computer.Anyway thanks!

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 10 guests