Script events in the ABBYY Scanning Station: automatic calls on station start, scanning completion, batch creation, page operations, export, and more.
You can handle the following events with scripts. Automatic scripts are set up according to the batch type and are not called during Undo operations.
Automatic call upon starting the station
Executed after the station is started.
Automatic call prior to closing the station
Executed before the station is closed.
Automatic call upon scanning session completion
Executed upon completion of the scanning session. Scripts of this type are intended for modifying a scanned batch according to custom rules.
Automatic call upon adding a page
Executed after adding a page to the batch. Scripts of this type are intended for modifying a page.
Automatic call upon creating a batch
Executed after a batch has been created manually or automatically during scanning. Scripts of this type are intended for filling registration parameters of the batch, renaming the batch according to custom rules, and so on.
Automatic call upon forming a document
Executed after a document has been formed manually or automatically during scanning. Scripts of this type are intended for filling registration parameters of the document, renaming the batch according to custom rules, searching for a barcode value using an external component, and so on.
Automatic call prior to deleting an element of the workspace
Executed before the element is deleted by the user. Scripts of this type are intended to prevent deleting important elements.
Automatic call prior to an operation on a page
Executed before the user applies a page modification operation. Scripts of this type are intended to prevent modification of pages that have already been modified. Information about the operation being executed is available in this script.
Automatic call upon completion of the operation on a page
Executed after the user applies a page modification operation. Scripts of this type are intended to save information about modified pages. Information about the operation being executed is available in this script.
Automatic call prior to export
Executed before the task is sent to background, but after the batch registration parameters are defined. If the call fails, the export task is not performed and a predefined message is displayed to the user. Scripts of this type can modify the batch.
Automatic call upon export
Executed after the export task is completed in the background, but unlike the export task the script is executed in the main application. If the main application is closed at the moment of export completion, the script will be executed with the next start of the station. Scripts of this type can modify the batch.You can check whether the export succeeded using the script parameters “IsExported” and “ExportError”.
An additional type of export
Executed in the background similar to other types of export. Scripts of this type cannot modify the batch, they can only return the result path and/or the reason for the failure and the list of exported batch elements. The list and the path will be available for the script if the export is resumed.Scripting export is set up in the batch type on the export tab.
Call by an explicit user command
A named list of scripts is declared in the batch type. You can select a script to run from this list when you call the corresponding command for the open batch.Scripts from lists of any type can be added as a separate button to an additional user scripts toolbar.Note. Toolbar customization can be called both from the list of scripts and from the main menu.In the list of scripts, you can also assign an event that triggers the script.