> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scripts for processing interface events

> Use scripts to handle interface events in ABBYY FlexiCapture stations: customize the UI, change station behavior, and implement custom user commands.

In ABBYY FlexiCapture, you can use scripts to process [interface events](/flexi-capture/appendix/scripts-shell/events-appendix-scripts-shell). This allows you to configure the operation of a station, customize its interface, change a station's behavior under certain conditions, implement user commands, etc.

These scripts can be added  *(Distributed)* for interactive [workflow stages](/flexi-capture/project-settings/workflow-stages) and for tools configured in the *(Distributed)* [Tool Settings](/flexi-capture/project-settings/batch-type-tools) dialog box *(Standalone)* when configuring  *(Administrator, Standalone)* [batch type tools](/flexi-capture/project-settings/batch-type-tools) *(Developer, Standalone)* batch type tools.

All script [objects](/flexi-capture/appendix/scripts-shell/objects-appendix-scripts-shell) are available for reading and writing.

Access permissions to objects of the [ControllerInterop](/flexi-capture/appendix/scripts/objects) used in scripts depend on the objects' state. The current document's state is returned by the **DocumentState()** method of the [ITaskWindow](/flexi-capture/appendix/scripts-shell/itaskwindow) interface. If the document's state is [DS\_Opened](/flexi-capture/appendix/scripts-shell/tdocumentstate), then the [ControllerInterop](/flexi-capture/appendix/scripts/objects) objects of the document are available for reading and writing. For other states, the objects of [ControllerInterop](/flexi-capture/appendix/scripts/objects) are read-only.

Events that can be handled by means of scripts and their parameters are described below.

[Events](/flexi-capture/appendix/scripts-shell/events-appendix-scripts-shell)

[Objects](/flexi-capture/appendix/scripts-shell/objects-appendix-scripts-shell)

<Note>
  Any changes you make to the interface by means of scripts will be discarded in the following cases:
</Note>

* When you enter a batch type other than the default batch type
* When you exit a batch type other than the default batch type
* When you open or close a project
* When you close the station

<Note>
  *(Distributed)* Web Stations do not support the use of scripts.
</Note>
