Key VB Script Features Demonstrated in the Script - 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
  • .CustomMessage

  • Calling a value between zones

  • .CurrentLine

  • .CurrentLineNumber

Example Script: Interactive - Zone "zLastName"

The following is an interactive script on zone zLastName. It's purpose is to populate the Custom Message with data and a prompt.

zSpouseLastName.CustomMessage = "Current value in memory is " & This.Value & ". Hit = then ENTER to copy to this zone."

Example Script: Interactive -Zone "zSpouseLastName"

This script allows the use of "=" to copy down the information. The first IF statement is to protect the LEFT function from firing if there is no data in the zone.

If This.Value <> "" Then

If Left(This.Value, 1) = "=" Then

This.Value = zLastName.Value

End If

End If

Example Script: Interactive - Copying Down in a Column Zone (or Algorithm)

This script pulls down to the current line in the column the last found non-null value in the column. In this example, the value is being copied to another line in a group column zone or algorithm

If This.CurrentLineNumber <> 1 And This.CurrentLine = "" Then

This.CurrentLine = This.Line(This.CurrentLineNumber - 1).Value

If This.CurrentLine = "" Then

For yy = 2 To This.CurrentLineNumber

nLines = This.CurrentLineNumber - yy

strTemp = This.Line(nLines).Value

If strTemp <> "" Then

For xx = (nLines + 1) To This.CurrentLineNumber

This.Line(xx).Value = strTemp

Next

Exit For

End If

Next

End If

End If