OCR Stops MS

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Tukan
Newbie
Posts: 1
Joined: Fri Jul 08, 2016 2:26 am

OCR Stops MS

Post by Tukan » Fri Jul 08, 2016 2:49 am

I'm betting I'm just not seeing the problem right in front of my face but...

I found this script by going through the Forums. I keep getting the error "msched.exe has stopped working" when I run it with the shown X and Y. I've had this problem with many different plots and have had some limited luck in finding a set of numbers that do work where I need it too. Does anyone have an idea how to fix this so I don't see this again? I use Windows 7 and 2007 Office version of Microsoft Office Document Imaging.

Thank you!
Tukan


Here is the simple part of an OCR script:

//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1

VBStart
Function DoOCR(bitmapfile)
Dim miDoc
Dim miLayout
Dim stringOut
set miDoc=CreateObject("MODI.Document")
miDoc.Create (bitmapfile)
' Perform OCR.
'You can change the mousepointer here to an hourglass or something.
miDoc.Images(0).OCR
'Change the mouse back to normal default.
set miLayout = miDoc.Images(0).Layout
stringOut=miLayout.Text
'MsgBox(stringOut)
DoOCR = stringOut
Set miLayout = Nothing
Set miDoc = Nothing
End Function
VBEND


let>x=480
Let>y=395
Let>w=675
Let>h=415

ScreenCapture>x,y,w,h,%TEMP_DIR%\~scrn.bmp
\\ExecuteFile>%TEMP_DIR%\~scrn.bmp,
Use OCR to get text from active window
VBEval>DoOCR("%TEMP_DIR%\~scrn.bmp"),TheText
//Display the text
Message>TheText
wait>5



The dump information:

Problem signature:
Problem Event Name: BEX
Application Name: msched.exe
Application Version: 1.0.0.0
Application Timestamp: 5719ff8c
Fault Module Name: MSVCR80.dll
Fault Module Version: 8.0.50727.6195
Fault Module Timestamp: 4dcddbf3
Exception Offset: 00008aa0
Exception Code: c000000d
Exception Data: 00000000
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: b9c9
Additional Information 2: b9c9abd570b2b3539f8189bff2c47d16
Additional Information 3: a0ec
Additional Information 4: a0ec0db2d5bcb30c9d8b721beb0574a0

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts