main()
Func foo()
Local $oWord
Local $retorno = False
Local $palavras[8]
Local $achouHoras = False
Local $Image = @MyDocumentsDir & "\a_teste.tif"
_ScreenCapture_Capture($Image, 484, 243, 660, 263)
Local $miDoc = ObjCreate("MODI.Document")
If @error then recover()
$miDoc.Create($Image)
If @error then recover()
$miDoc.Ocr(9, false, false)
If @error then recover()
ConsoleWrite($miDoc.Images(0))
If @error then recover()
return something
End func
Func recover()
main()
End Func
Func main()
Do
foo()
sleep(2000)
Until false
End FuncDears, i have a script that must run 24h. I created a function to restart the execution if i have a error go to recover and back to execute again. But when the script have a error its stops the execution. What i have to do, to do not stop the execution like a Java try catch? Thanks Console: (94) : ==> The requested action with this object has failed.: $miDoc.Ocr(9, false, false) $miDoc^ ERROR >Exit code: 1 Time: 80.06