Skip to main content
What it does
Represents the station workspace. The object is available in scripts with the keyword “this”.
Methods

Definition

Description

AddBatch (target: IWorkspaceItem, name: string, type: IBatchType ): IWorkspaceItem

Adds a batch. A new batch will be added after the batch specified in the target parameter.

If you want to add the batch to the beginning of the list, set the value of the target parameter to “Nothing”:

[VBscript]

me.AddBatch Nothing, “batch 1”, me.BatchTypes.Item(0)

If the name parameter is empty, the batch name will be generated according to the batch settings.

AddDocument (page: IWorkspaceItem, name: string): IWorkspaceItem

Inserts the page into a new document. If the page is already included in the document, three documents will be created: one document with the previous pages, one document the current page and one document with the following pages. If the name parameter is empty, the document name will be generated according to the batch settings.

AddPages (fileName: string, target: IWorkspaceItem, [optional] inside: bool): IWorkspaceItems

Adds pages from file. Pages can be added after the target item at the same level or inside the target item to the beginning of the list. A target can be batch, document or page. If the target is batch, the inside parameter must be “true” (pages will be added to the beginning of the batch). If the target is page, the inside parameter must be “false” (pages will be added after the specified page). If the target is document, the inside parameter cab be both “true” and “false”.

ClearSelection ()

Clears the current selection

DeleteItem (item: IWorkspaceItem )

Deletes a specified item

DetectPageEmpty (page: IWorkspaceItem, [optional] options: IEmptyPageDetectionOptions ): bool

Detects an empty page

Exit ( ): bool

Finishes the station work

FindPageBarcodes (page: IWorkspaceItem, [optional] options: IBarcodeFindingOptions ): IScriptFoundBarcodes

Searches for barcodes on the page

NewBarcodeFindingOptions ( ): IBarcodeFindingOptions

Sets barcode finding options

NewEmptyPageDetectionOptions ( ): IEmptyPageDetectionOptions

Sets options for detecting empty pages

NewImageSavingOptions ( ): IImageSavingOptions

Sets image saving options

NewPageRect ( ): IPageRect

Defines a page rectangle

RunScript (scriptName: string, [optional] info: string, [optional] skipShowError: bool): IScriptResult

Runs the script execution

Scan ([optional] folder: string)

Starts scanning with settings of the current batch type

Send (batch: IWorkspaceItem)

Exports the batch with the settings of the current batch type

SendByScript (batch: IWorkspaceItem, skipShowExportOptions: bool)

Sends the batch by using script with the settings of the current batch type. The skipShowExportOptions parameter specifies whether to display Export Options dialog box before sending the batch.

SendToFC (batch: IWorkspaceItem, [optional] skipShowExportOptions: bool)

Sends the batch to ABBYY FlexiCapture with the settings of the current batch type. The skipShowExportOptions parameter specifies whether to display Export Options dialog box before sending the batch.

SendToFolder (batch: IWorkspaceItem, [optional] skipShowExportOptions: bool)

Export the batch to a folder with the settings of the current batch type. The skipShowExportOptions parameter specifies whether to display Export Options dialog box before sending the batch.

SendToFTP (batch: IWorkspaceItem, [optional] skipShowExportOptions: bool)

Exports the batch to an FTP folder with the settings of the current batch type. The skipShowExportOptions parameter specifies whether to display Export Options dialog box before sending the batch.

SetPageImage (page: IWorkspaceItem, fileName: string, [optional] filePageIndex: int)

Changes the image of the page

Wait (millisecond: int)

Suspends the script execution for the specified time (in milliseconds)

Properties

Name

Type

Access

Description

ActiveBatch

IWorkspaceItem

Read/write

The active batch.

For some event scripts (e.g. On batch sending and On batch sent), returns null.

Batches

IWorkspaceItems

Read-only

Batches

BatchTypes

IBatchTypes

Read-only

Batch types

CurrentBatchType

IBatchType

Read/write

The current batch type

Result

IScriptResult

Read-only

The result of the script execution

ScriptEnvInfo

string

Read-only

Environmental information about conditions on which the script is triggered.

For scripts triggered automatically before or after export, its value is “<exportType> <taskID>”, where “exportType” can be “Folder”, “FTP”, “FC”, “RS” or “Script” and “taskID” is the export task identifier.

For scripts triggered automatically before or after page transformation, the property takes on one of the following values: “Rotate <angle>”, “FlipHorizontal”, “FlipVertical”, “Invert”, “ConvertToBW”, “Deskew”, “Despeckle”, “Erase <rectLeft> <rectTop> <rectRight> <rectBottom>”, “Crop <rectLeft> <rectTop> <rectRight> <rectBottom>”, “SplitHorizontal <pos>”, “SplitVertical <pos>”, “ChangeResolution <newRes>”, “Scale <ratio>”, “FreeScale <newWidth>, <newHeight>, <newRes>”.

ScriptItems

IWorkspaceItems

Read-only

Items for which the script is called. The returned value is different for different events.

For the events On station started and On station closing the returned value is empty.

For the event On scan completed the returned value is a list of pages added during the scanning session.

For other events the returned value is a batch, a document or a page depending on the event.

When the script is launched by an explicit user command, a collection of currently selected items is returned.

ScriptProperties

IScriptProperties

Read-only

Script properties

Selection

IWorkspaceItems

Read-only

The current selection. Contains batches only, documents only or pages only.

SourceID

string

Read-only

The station identifier