Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drop Box for OCR
#1
Hi,

I am using the OCR functionality to get some text from a certain area of the screen. The onscreen measurements of my analysis program aren't accessible by normal QM methods.


Code:
Copy      Help
CaptureRect5 1 800 250 250



str img="$common documents$\My QM Share\clipboard.bmp" ;;this is an image containing text
run "$common documents$\My QM Share\clipboard.bmp"

typelib MODI {A5EDEDF4-2BBC-45F3-822B-E60C278A1A79} 11.0
MODI.Document doc._create

doc.Create(img.expandpath)
doc.OCR(MODI.miLANG_ENGLISH -1 0)

MODI.Image im=doc.Images.Item(0)
str s=im.Layout.Text

out s ;;and this is the text


I want to direct the user to drop the figures in this small area to CaptureRect. Even just a drawing of a Rectangle on screen to temporarily indicate where the screen grab will occur would be great. Any ideas?

Thanks,
Stuart


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)