Forum Discussion
sanjay0288
13 years agoFrequent Contributor
Hi I had written the below code.
Set p = Sys.Process("mspaint").Window("MSPaintApp", "untitled.JPG - Paint", 1).Picture(0,0,-1,-1, true)
set x= p.GetRect(135,331,137,346)
Set OCRObj = OCR.CreateObject(x)
Set ocrOpt = OCRObj.CreateOptions
Set Font = ocrOpt.Fonts.Add
Set Font = ocrOpt.Fonts.Add
Font.Name="Arial"
ocrOpt.ExactSearch=True
ocrOpt.ActiveRecognitionSet=2
ocrOpt.BinarizationThreshold =100
'Font.Styles.Add 2 ' Choosing bold font type
vTempStr1 = OCRObj.GetText(ocrOpt)
Msgbox vTempStr1
But i am not able to fetch the entire string functional. Any thoughts on this?
Set p = Sys.Process("mspaint").Window("MSPaintApp", "untitled.JPG - Paint", 1).Picture(0,0,-1,-1, true)
set x= p.GetRect(135,331,137,346)
Set OCRObj = OCR.CreateObject(x)
Set ocrOpt = OCRObj.CreateOptions
Set Font = ocrOpt.Fonts.Add
Set Font = ocrOpt.Fonts.Add
Font.Name="Arial"
ocrOpt.ExactSearch=True
ocrOpt.ActiveRecognitionSet=2
ocrOpt.BinarizationThreshold =100
'Font.Styles.Add 2 ' Choosing bold font type
vTempStr1 = OCRObj.GetText(ocrOpt)
Msgbox vTempStr1
But i am not able to fetch the entire string functional. Any thoughts on this?