ChronoScan injects a set of COM objects in every VBScript (and PowerShell) context. Which objects exist depends on the event: a job event has the batch, a document event also has the document, its type and its fields. The table lists the objects and where they come from.
Barcodes read on the page being added (see below).
BatchControl
Barcode trigger scripts (before adding the page)
Tells ChronoScan to drop the page or to start a new document (see below).
The scripts also have access to ChronoScanApp, the global object that provides MsgBox, InputBox and the other global functions used in the examples.
ChronoJobField
Definition of a document field or a batch field of the job, as returned by ChronoJob.GetUserField, GetUserFieldByName, GetBatchField and GetBatchFieldByName. All the properties are read-only.
Type
Property
Description
string
fldName
(read-only)
Name of the field.
string
desc
(read-only)
Description of the field.
string
fieldtype
(read-only)
Type of the field (text).
string
defval
(read-only)
Default value.
string
deftypeid
(read-only)
Default document type id.
string
validationmask
(read-only)
Validation mask.
string
inputmasku
(read-only)
Input mask.
string
getreadonly
(read-only)
Whether the field is editable by the user.
string
requiered
(read-only)
Whether the field is required.
string
visible
(read-only)
Whether the field is visible.
variant
Value
Value (when the object comes from a document).
short
fieldtype_val
(read-only)
Type of the field (numeric code).
ChronoProc
Carries the parameters that ChronoScan passes to a script and the values the script returns. It is injected in the events that have parameters (for example the Enterprise document validation event) and in the hot folder scripts that compute a value, such as the batch name script: read the parameters with get_param and return the result with add_retvalue. Command line scripts receive their parameters the same way, see Using Command Line Parameters on VBScript.
Returns
Method
Description
short
get_parm_count
()
Number of parameters passed to the script.
void
add_param
(string inparam)
Adds a parameter (used by ChronoScan when preparing the call).
short
get_ret_count
()
Number of return values added so far.
void
add_retvalue
(string retval)
Adds a return value for ChronoScan; for example, the hot folder batch name script returns the batch name with add_retvalue.
string
get_param
(short index)
Returns the parameter at the given index (0-based).
string
get_retval
(short index)
Returns the return value at the given index (0-based).
BCReader
Available in the scripts of the barcode triggers (Execute VBScript before adding the page / after adding the document): the barcodes found on the page, with their value, type and position in pixels.
Type
Property
Description
short
Count
(read-only)
Number of barcodes read on the page.
Returns
Method
Description
string
BC_Value
(short index)
Value of the barcode at the given index (0-based).
string
BC_Type
(short index)
Type (symbology) of the barcode at the given index.
short
BC_X
(short index)
Horizontal position of the barcode.
short
BC_Y
(short index)
Vertical position of the barcode.
short
BC_SX
(short index)
Width of the barcode.
short
BC_SY
(short index)
Height of the barcode.
BatchControl
Available in the barcode trigger script that runs before the page is added: set DeletePage to 1 to discard the page or SplitDocument to 1 to start a new document with it. The values come preset with the decision of the trigger configuration, so the script can override it.
Type
Property
Description
short
DeletePage
Set it to 1 to delete the page being added.
short
SplitDocument
Set it to 1 to start a new document with the page being added.