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

# IMainWindow

> IMainWindow exposes a FlexiCapture station's main window to scripts: enable or disable commands and get the main menu, toolbars, selection, and user role.

## What it does

Represents the main window.

## Methods

| **Definition**                                                                                       | **Description**                                                                              |
| ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| CommandIsEnabled( commandId: [TCommandID](/flexi-capture/appendix/scripts-shell/tcommandid) ) : bool | Returns **true** for a command that is enabled and **false** for a command that is disabled. |
| EnableCommand( commandId: [TCommandID](/flexi-capture/appendix/scripts-shell/tcommandid), bool)      | Makes a command available or unavailable in the GUI.                                         |

## Properties

| **Name**       | **Type**                                                                 | **Access** | **Description**                |
| -------------- | ------------------------------------------------------------------------ | ---------- | ------------------------------ |
| Handle         | int                                                                      | Read-only  | The handle of the window       |
| MainMenu       | [IMainMenu](/flexi-capture/appendix/scripts-shell/imainmenu)             | Read-only  | The main menu                  |
| Selection      | [ISelection](/flexi-capture/appendix/scripts-shell/iselection)           | Read-only  | The selection                  |
| TaskWindow     | [ITaskWindow](/flexi-capture/appendix/scripts-shell/itaskwindow)         | Read-only  | The task window                |
| Toolbars       | [IToolbars](/flexi-capture/appendix/scripts-shell/itoolbars)             | Read-only  | The collection of toolbars     |
| UserRole       | [TUserRole](/flexi-capture/appendix/scripts-shell/tuserrole)             | Read-only  | The user role                  |
| WorkWindowType | [TWorkWindowType](/flexi-capture/appendix/scripts-shell/tworkwindowtype) | Read-only  | The type of the working window |
