> ## 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.

# インターフェイスイベントを処理するスクリプト

> ABBYY FlexiCapture ステーションでインターフェイスイベントを処理するには、スクリプトを使用します。UI のカスタマイズ、ステーションの動作変更、カスタムユーザーコマンドの実装が可能です。

ABBYY FlexiCapture では、スクリプトを使用して[インターフェイスイベント](/ja/flexi-capture/appendix/scripts-shell/events-appendix-scripts-shell)を処理できます。これにより、ステーションの動作を設定したり、インターフェイスをカスタマイズしたり、特定の条件下でのステーションの動作を変更したり、ユーザーコマンドを実装したりできます。

これらのスクリプトは、対話型の[ワークフローステージ](/ja/flexi-capture/project-settings/workflow-stages) *(Distributed)* や、*(Administrator, Standalone)* [バッチタイプツール](/ja/flexi-capture/project-settings/batch-type-tools) *(Developer, Standalone)* バッチタイプツールの設定時に *(Distributed)* [Tool Settings](/ja/flexi-capture/project-settings/batch-type-tools) ダイアログ *(Standalone)* で設定されたツールに追加できます。

すべてのスクリプト[オブジェクト](/ja/flexi-capture/appendix/scripts-shell/objects-appendix-scripts-shell)は、読み取りと書き込みが可能です。

スクリプトで使用される [ControllerInterop](/ja/flexi-capture/appendix/scripts/objects) のオブジェクトへのアクセス権は、オブジェクトの状態によって異なります。現在のドキュメントの状態は、[ITaskWindow](/ja/flexi-capture/appendix/scripts-shell/itaskwindow) インターフェイスの **DocumentState()** メソッドによって返されます。ドキュメントの状態が [DS\_Opened](/ja/flexi-capture/appendix/scripts-shell/tdocumentstate) の場合、ドキュメントの [ControllerInterop](/ja/flexi-capture/appendix/scripts/objects) オブジェクトは読み取りと書き込みが可能です。それ以外の状態では、[ControllerInterop](/ja/flexi-capture/appendix/scripts/objects) のオブジェクトは読み取り専用です。

スクリプトで処理できるイベントとそのパラメーターについて、以下で説明します。

[イベント](/ja/flexi-capture/appendix/scripts-shell/events-appendix-scripts-shell)

[オブジェクト](/ja/flexi-capture/appendix/scripts-shell/objects-appendix-scripts-shell)

<Note>
  スクリプトを使用してインターフェイスに加えた変更は、次の場合に破棄されます。
</Note>

* 既定のバッチタイプ以外のバッチタイプに入ったとき
* 既定のバッチタイプ以外のバッチタイプを終了したとき
* プロジェクトを開いたとき、または閉じたとき
* ステーションを閉じたとき

<Note>
  *(Distributed)* Web Stations ではスクリプトはサポートされていません。
</Note>
