Getting closer, but no luck yet. First I captured the actual _cmd string like this, and stopped execution:
Code: Select all
fileappend, %_cmd%, Command.txt
msgbox execute command.txt in leptonica directory
Checking in %temp%, these files were created:
- Capture1.PNG (3.81 KiB) Viewed 6853 times
Then I executed the contents of '_cmd' from the command prompt. These files were created:
- Capture2.PNG (6.18 KiB) Viewed 6853 times
So the .tif CAN be created.
I put in a 5-second delay, and processing still failed, but this time at the conversion to txt.
EDIT: Honing in on it. Changed the leptonica command to:
Now the .tif file gets created in %temp%, and error is now thrown by tesseract, not leptonica.
EDIT: Also changed tesseract runwait to:
Still getting tesseract error, but command runs.
EDIT: I used the same "command.txt" strategy to run tesseract in the middle of the process. Here's the result:
- CaptureTess.PNG (7.1 KiB) Viewed 6848 times
EDIT: The above command will run if I enclose all the parameters in quotes. Now all I need to do is figure out how to get the variables in
Code: Select all
convert_best(in:="", out:="", fast:=0){
in := (in) ? in : this.fileProcessedImage
out := (out) ? out : this.fileConvertedText
fast := (fast) ? this.tessdata_fast : this.tessdata_best
enclosed in quotes.
Workaround: No spaces in folder names
Regards,
burque505