If command based on error string vs !statusok

Hello!

I have found that OCR can throw an error message of: OCR timeout

Can a command be created to capture the error message generated vs a boolean of !statusok?

I would like to capture this error message and base on an if command on that string vs a !statusok = false.

Currently in use:
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!errorignore”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “ocr=[CLICK ME]”,
“Value”: “#doubleclick”,
“Description”: “”
},
{
“Command”: “gotoIf_v2”,
“Target”: “${!statusOK} == false”,
“Value”: “end_macro”,
“Description”: “”
},…

Ideally I would want something like this:

{
  "Command": "store",
  "Target": "true",
  "Value": "!errorignore",
  "Description": ""
},
{
  "Command": "XClick",
  "Target": "ocr=[CLICK ME]",
  "Value": "#doubleclick",
  "Description": ""
},
{
  "Command": "if_v2",
  "Target": "${!error_message} == \"OCR Timeout\"",
  "Value": "",
  "Description": ""
},
{
  "Command": "throwError",
  "Target": "OCR has timedout. Stop Macro. ",
  "Value": "",
  "Description": ""
},
{
  "Command": "elseif",
  "Target": "${!error_message} == \"no match found for 'ocr=[CLICK ME]'\"",
  "Value": "",
  "Description": ""
},
{
  "Command": "gotoLabel",
  "Target": "end_macro",
  "Value": "",
  "Description": ""
},
{
  "Command": "end",
  "Target": "",
  "Value": "",
  "Description": ""
}

I suppose a workaround could be to write a script to test the OCR connection and return an exit code to be captured by ${!xrun_exitcode}?

thanks!

Can I ask why you use online ocr and not the local (offline) ocr option?

Certainly!

I am hosting a local OCR instance for the linux hosts utilizing firefox. I do look forward to the future releases of the xmodule-ocr so that I may eventually pivot to all the new features greater than firefox v6.2.6