Knowledge Base

Article ID: 1338 | Category: Scanning | Type: FAQ | Last Modified: 8/27/2015

Using Scripts in ABBYY Scanning Station


When scripts may be useful on ABBYY Scanning Station? How can I create scripts on ABBYY Scanning Station?


Scripts can be used to implement complex scenarios of working with ABBYY Scanning Stations. They can be used to automatically fill in the registration parameters of batches and documents, call an external component to check the quality of scanned pages, create backup copies of images, and much more.

Three types of scripts are available:

Export scripts

This type of script is used to configure additional kinds of export from Scanning Station. Like other kinds of export, this script runs in background mode.

Note that this type of script cannot modify a batch. It can only return the resulting export receiver, the cause of the error (if any), and the list of exported batch items. This list and the resulting receiver will be available to the script when the export continues. For more information about the objects available from within export scripts, please see Scanning Station Help: Using scripts in ABBYY Scanning Station → Objects → Objects available from export scripts.

Event handlers

These scripts are triggered by their associated events. The following events are supported:

For more information about the supported events, please refer to Scanning Station Help: Using scripts in ABBYY Scanning Station → Events.

Unlike export scripts, event handlers are executed in the main application, not in background mode.

Scripts run by an explicit user command

These scripts are not associated with any specific events. You simply create a named list of scripts in a batch type, and the user may call them by selecting Edit → Run Script.

You can also add a button for a script onto the toolbar.

The same objects are available from these scrips as are available from event handlers. These scripts are also run in the main application.

Creating scripts on ABBYY Scanning Station 

All scripts on Scanning Station must be associated with a batch type.

Supported scrupting languages: JScript, VBScript.

To add an export script, go to the Send To tab of the Batch Type Properties dialog box.

To add event handlers and scripts run by user command, go to the Scripts tab (click Add…, open a name for the script, and select the desired event from the Event drop-down list).


If you leave the Event field empty, the script will not be triggered by any specific event. Instead, the user will need to run it manually. To run this script for a particular batch, the user needs to select the desired batch, select Edit → Run Script, and then select the script from the drop-down list:


As mentioned above, you can add buttons for your scripts onto the toolbar. To select an icon for a script, on the Scripts tab of the Batch Type Properties dialog box, click Customize Toolbar… In the Toolbar Customization dialog box, click Add button…, select the script from the drop-down list, and then select an icon:


Icons have to be loaded first (use the Load bitmap button). Only 24x24 *.bmp icons are supported.

By default, the Scripts toolbar is disabled. To enable the toolbar, select View → Toolbars → Scripts.

If a procedure is to be used by several scripts, you can add it to the GlobalModule so as not to reproduce the same code in each of the scripts (select the script editor from the drop-down list on the toolbar).

Sample scripts

734 people think this is helpful.
Was this information helpful to you?