Reachtabhair
asked on
Using command lines to operate OCR software through VB6
Hi
I'm having real difficulty with using command lines to control a OCR program through Visual Basic 6.
Basically I have command lines to control a OCR program called SimpleOCR, and honestly I have no Idea how!!
So far I've tried running through DOS with very little luck.
Is there an easier way to use these command lines to access my OCR software.
Thanking in advance
I'm having real difficulty with using command lines to control a OCR program through Visual Basic 6.
Basically I have command lines to control a OCR program called SimpleOCR, and honestly I have no Idea how!!
So far I've tried running through DOS with very little luck.
Is there an easier way to use these command lines to access my OCR software.
Thanking in advance
ASKER
Hi alan
thanks for the reply
This is what i've done so far, the problem is that I keep getting a error called 'File Creation Error' on the DOS screen.
If you could have a look at the code and give me your opnion it would be greatly appreciated....
Private Sub Command1_Click()
Open "C:\commandline.bat" For Output As #1
Print #1, "Cd .."
Print #1, "Cd .."
Print #1, "Cd .."
Print #1, "Cd .."
Print #1, "cd progra~1"
Print #1, "cd Simple~1"
Print #1, "cd bin"
Print #1, "simpleocrcmd"
Print #1, "SimpleOCRCmd [/NONE] <C:\images\Test.tif> <C:\text\line.txt>"
Close #1
Shell ("C:\commandline.bat"), vbNormalFocus
End Sub
thanks for the reply
This is what i've done so far, the problem is that I keep getting a error called 'File Creation Error' on the DOS screen.
If you could have a look at the code and give me your opnion it would be greatly appreciated....
Private Sub Command1_Click()
Open "C:\commandline.bat" For Output As #1
Print #1, "Cd .."
Print #1, "Cd .."
Print #1, "Cd .."
Print #1, "Cd .."
Print #1, "cd progra~1"
Print #1, "cd Simple~1"
Print #1, "cd bin"
Print #1, "simpleocrcmd"
Print #1, "SimpleOCRCmd [/NONE] <C:\images\Test.tif> <C:\text\line.txt>"
Close #1
Shell ("C:\commandline.bat"), vbNormalFocus
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a milion Alan
Gary
Gary
Dim RetVal
RetVal = Shell("pathtocommandlineco
However, this will start the command, but not wait for it to finish.
For more subtle control, you'll have to look into the ShellExecute or ShellExecuteEX API.
Regards .. Alan