Phaser Posted October 3, 2014 Share Posted October 3, 2014 I have managed to work with tesseract without using tesseratc.au3 include, just using ShellExecuteWait as I found using the command line with tesseract worked just fine. I am getting tesseract to perform and return a result like this ShellExecuteWait(@ProgramFilesDir & "\Tesseract-OCR\tesseract.exe", "image.png out") The result it prints to out.txt is correct but for some reason I cannot display the result with a MsgBox $file = FileOpen("out.text",0) $result = FileReadLine($file, 1) MsgBox(0,"The Result", "Number " & $result) As tesseract writes it to the first line each time I just want to display it in a msgbox so I don't have to keep checking the text file, what am I doing wrong? Link to comment Share on other sites More sharing options...
alienclone Posted October 3, 2014 Share Posted October 3, 2014 (edited) I have managed to work with tesseract without using tesseratc.au3 include, just using ShellExecuteWait as I found using the command line with tesseract worked just fine. I am getting tesseract to perform and return a result like this ShellExecuteWait(@ProgramFilesDir & "\Tesseract-OCR\tesseract.exe", "image.png out") The result it prints to out.txt is correct but for some reason I cannot display the result with a MsgBox $file = FileOpen("out.text",0) $result = FileReadLine($file, 1) MsgBox(0,"The Result", "Number " & $result) As tesseract writes it to the first line each time I just want to display it in a msgbox so I don't have to keep checking the text file, what am I doing wrong? your code should read out.txt NOT out.text next time add error check to find problem ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf Edited October 3, 2014 by alienclone If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version Link to comment Share on other sites More sharing options...
Phaser Posted October 3, 2014 Author Share Posted October 3, 2014 LOL, thanks very much, couldn't see the wood for the trees, slap taken gracefully Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now