Hi,
I am also having troubles on Windows 10 Home 64-bit.
I have downloaded the latest version from
https://github.com/iseahound/Vis2/archive/master.zip
It
works in interactive mode, but when I try to use the other methods I get the blank box problem.
Code: Select all
#include <Vis2> ; Equivalent to #include .\lib\Vis2.ahk
MsgBox % OCR("test.jpg") ; << Does not work
#c:: OCR() ; << Works perfect!
Esc:: ExitApp
I also tried the WinTitle (using notepad) and URL methods, which also did not work.
I ran the DetectBugs script posted earlier in this thread and I get this error:
https://i.imgur.com/0TZQk5P.png
From here, I did some further digging and this is what I found:
Code: Select all
; Line 2140 of Vis2.ahk
_cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q SubStr(out, 1, -4) q
%out% contains only the filename without extension, so the SubStr does not remove the extension (as I think intended?) and instead shortens the actual name.
- Vis2_screenshot2f379028-4dde-47c6-b9f6-9b3713be8123.bmp
Vis2_preprocess2f379028-4dde-47c6-b9f6-9b3713be8123.tif
Vis2_text2f379028-4dde-47c6-b9f6-9b3713be.txt
Is an example of what gets created on my system.
Then %out% is looking for the full file name and this of course does not exist so the exception is thrown.
If I remove the SubStr and append the .txt to %out% then I can get DetectBugs to run.
Code: Select all
_cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q out q
;_cmd .= q this.tesseract q " --tessdata-dir " q fast q " " q in q " " q SubStr(out, 1, -4) q
; (...snip...)
out := out . ".txt
And my results are:
- No text file found. #1
Test2: No text file found. #2
Regards.
[edit] Also, when I run my main script again:
Code: Select all
#include <Vis2> ; Equivalent to #include .\lib\Vis2.ahk
MsgBox % OCR("test.jpg") ; << Does not work
#c:: OCR() ; << Works perfect!
Esc:: ExitApp
The file that gets created in my temp has two extensions:
Vis2_text38ed24b5-3fc9-4feb-8a57-b4057148aee2.txt.txt