Example - OCR for AnyDoc - Foundation 23.1 - Foundation 23.1 - AnyDoc - external

OCR for AnyDoc Programming Reference Guide

Platform
AnyDoc
Product
OCR for AnyDoc
Release
Foundation 23.1
License

If Country.IsBlank Then

PostalCode.ApplyEditMask("99999")

ElseIf Country.Value = "CANADA" Then

PostalCode.ApplyEditMask("A9A9A9")

End If

  1. Draw a text zone around the Postal Code field and name the PostalCode.
  2. Draw a text zone around the Country field and name the field Country.
  3. Indicate that each zone is handprint and assign the correct number of character constraint boxes for each zone (Parameters Toolbox button | Recognition Parameters | Print Type tab).
  4. Select Parameters Toolbox button | Rules Parameters, then click the postal code zone.
  5. Click the VBScript tab | Post Extraction button to access the VBScript window.
  6. Enter the following code in the main VBscript window:

    If Country.IsBlank Then

    PostalCode.ApplyEditMask("99999")

    ElseIf Country.Value = "CANADA" Then

    PostalCode.ApplyEditMask("A9A9A9")

    End If

  7. Click the Syntax Check button to identify any syntax errors in the script. "Successfully Compiled!” appears at the bottom of the window.
  8. Click OK in both the VBScript Editor and Rules Parameters window.
    You now have created a conditionally implemented Edit Mask. If the Country zone is not blank, then the Edit Mask is A9A9A9 to constrain the zone data.