# Lister

The **Lister** object represents an open [Lister](https://chaoses-ib.gitbook.io/directory-opus/manual/basic_concepts/the_lister) window. A collection of currently open Lister objects is available from the [**DOpus**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dopus)**.listers** property, and if a command results in a new Lister being opened, the [**Results**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/results) object.

| Property Name | Return Type                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| activetab     | *object:*[**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)           | Returns a [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab) object representing the currently active (source) tab.                                                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| bottom        | *int*                                                                                                                                 | Lister window bottom-edge coordinate.                                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| custom\_title | *string*                                                                                                                              | Returns the custom title of the Lister (if any) as set by the **Set LISTERTITLE** command. This may be an empty string. The *title* property returns the actual window title.                                                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| desktop       | *string*                                                                                                                              | Returns the ID of the virtual desktop this Lister is on.                                                                                                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| desttab       | *object:*[**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)           | Returns a [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab) object representing the current destination tab (in a dual-display Lister).                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| dual          | *int*                                                                                                                                 | <p>Indicates whether the Lister is in <a href="../../../basic_concepts/the_lister/dual_display">dual-display mode</a> or not. Possible values are:</p><p><em>int</em></p>                                                                                                                                                                                                                                                    | Returns the current split percentage of the dual displays (e.g. **50** indicates they are evenly sized).                                                                                                                                                                                                                                                                                                                            |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 0             | single-display mode                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1             | dual-display, vertical layout                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 2             | dual-display, horizontal layout                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| dualsize      |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| foreground    | *bool*                                                                                                                                | Returns **True** if this Lister is currently the foreground (active) window.                                                                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| lastactive    | *bool*                                                                                                                                | Returns **True** if this Lister is currently the active Lister (foreground window), or was the most recently active Lister.                                                                                                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| layout        | *string*                                                                                                                              | Provides the name of the [Lister layout](https://chaoses-ib.gitbook.io/directory-opus/manual/basic_concepts/the_lister/layouts) that this Lister came from (if any).                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| left          | *int*                                                                                                                                 | Lister window left-edge coordinate.                                                                                                                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| metapane      | *int*                                                                                                                                 | <p>Indicates whether the <a href="../../../basic_concepts/the_lister/metadata_pane">metadata pane</a> is currently open or not. Possible values are:</p><p><em>int</em></p>                                                                                                                                                                                                                                                  | Lister window right-edge coordinate.                                                                                                                                                                                                                                                                                                                                                                                                |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 0             | metadata pane is not open                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1             | metadata pane is open, vertical layout                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 2             | metadata pane is open, horizontal layout                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| right         |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| state         | *string*                                                                                                                              | <p>Returns the state of a single-display mode Lister:</p><p><em>string</em></p>                                                                                                                                                                                                                                                                                                                                              | Returns the name of the [Lister style](https://chaoses-ib.gitbook.io/directory-opus/manual/basic_concepts/the_lister/styles) which was last applied to the Lister, or an empty string if there is none. This is just the last style which was loaded and does not mean the Lister still looks the same; the user may have opened or closed panels and made other changes via other methods in the time since the style was applied. |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 0             | off                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1             | source                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 2             | destination                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 4             | locked                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| style         |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| tabs          | *collection:*[**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)       | Returns a collection of [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab) objects that represent all tabs in this Lister. In a dual-display Lister this includes tabs in both the left and right file displays.                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| tabgroupleft  | *string*                                                                                                                              | <p>Returns the name of the Folder Tab Group which was last loaded into the left half of the Lister, or an empty string if no group has been loaded.</p><p>The name only changes when a Folder Tab Group is loaded. The current tabs may no longer resemble the named tab group if the user has made changes since the group was loaded. The name persists across restarts, through the Default Lister and saved Layouts.</p> |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| tabgroupright | *string*                                                                                                                              | Similar to **tabgroupleft**, above, but for the right half of the Lister (if any).                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| tabsleft      | *collection:*[**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)       | Returns a collection of [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab) objects that represent the tabs in the left/top side of a dual-display Lister. In a single-display Lister this is equivalent to all the tabs in the Lister.                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| tabsright     | *collection:*[**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab)       | Returns a collection of [**Tab**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/tab) objects that represent the tabs in the right/bottom side of a dual-display Lister. In a single-display Lister this will return an empty collection.                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| title         | *string*                                                                                                                              | Returns the current title of the Lister window.                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| toolbars      | *collection:*[**Toolbar**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/command_reference/internal_commands/toolbar) | <p>Returns a collection of <a href="../../command_reference/internal_commands/toolbar"><strong>Toolbar</strong></a> objects representing all currently open toolbars in this Lister.</p><p>The collection is obtained directly each time the script asks for it, and is not a snapshot, so you don't need to call <strong>Update</strong> for it to reflect changes.</p>                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| top           | *int*                                                                                                                                 | Lister window top-edge coordinate;                                                                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| tree          | *int*                                                                                                                                 | <p>Indicates whether or not the <a href="../../../basic_concepts/the_lister/navigation/folder_tree">folder tree</a> is currently open. Possible values are:</p><p><em>string</em></p>                                                                                                                                                                                                                                        | If the [utility panel](https://chaoses-ib.gitbook.io/directory-opus/manual/basic_concepts/the_lister/utility_panel) is currently open, returns a string indicating the currently selected utility page. Possible values are **find** (which means the Find panel's Simple version), **findadvanced**, **sync**, **dupe**, **undo**, **filelog**, **ftplog**, **otherlog**, **email**.                                               |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 0             | folder tree is not open                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1             | a single tree is open, at the left of the Lister                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 2             | a single tree is open, at the right of the Lister                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 3             | two folder trees are open (in a dual-display Lister)                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| utilpage      |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| utilpane      | *int*                                                                                                                                 | <p>Indicates whether or not the <a href="../../../basic_concepts/the_lister/utility_panel">utility panel</a> is currently open. Possible values are:</p><p><em>object:</em><a href="vars"><strong>Vars</strong></a></p>                                                                                                                                                                                                      | This [**Vars**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/vars) object represents all defined variables with *Lister scope* (that are scoped to this Lister).                                                                                                                                                                                                             |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 0             | utility panel is not open                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1             | utility panel is open                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| vars          |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| viewpane      | *int*                                                                                                                                 | <p>Indicates whether or not the <a href="../../../basic_concepts/the_lister/viewer_pane">viewer pane</a> is currently open. Possible values are:</p><p><em>object:</em><a href="path"><strong>Path</strong></a></p>                                                                                                                                                                                                          | <p>Returns the path of the file currently displayed by the lister's viewer pane. The path will be an empty string if there is no file currenly displayed.</p><p>The path is obtained directly each time the script asks for it, and is not a snapshot, so you don't need to call <strong>Update</strong> for it to reflect changes.</p>                                                                                             |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 0             | viewer pane is not open                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 1             | viewer pane is open, vertical layout                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| 2             | viewer pane is open, horizontal layout                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| viewpanefile  |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| windowstate   | *string*                                                                                                                              | Returns the current visibility state of the Lister window. Possible values are:                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **min**       | the Lister is minimized                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **max**       | the Lister is maximized                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **hidden**    | the Lister is hidden                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **normal**    | the Lister is displayed normally                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|               |                                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                     |

| Method Name        | **Arguments**     | Return Type                                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dlg                | *none*            | *object:*[**Dialog**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dialog) | Creates a new [**Dialog**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dialog) object, that lets you display dialogs and popup menus. The dialog's **window** property will be automatically assigned to this Lister.                                                                                                                                                                                                                                                                                                                                        |
| IsOnCurrentDesktop | *none*            | *bool*                                                                                                                            | Returns **True** if the Lister is on the current virtual desktop.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| MoveToDesktop      | \<string:desktop> | *bool*                                                                                                                            | Moves the Lister window to the specified virtual desktop. Returns **True** if successful.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| SetTaskbarGroup    | \<string:group>   | *bool*                                                                                                                            | <p>Used to change how the Lister window is grouped with other Opus windows on the taskbar. Specify a group name to move the window into an alternative group, or omit the group argument to reset back to the default group. If one or more windows are moved into the same group, they will be grouped together, separate from other the default group.</p><p>This only works when taskbar grouping is enabled. Group names are limited to 103 characters and will be truncated if longer. Spaces and dots in group names are automatically converted to underscores. Returns <strong>True</strong> on success.</p> |
| Update             | *none*            | *none*                                                                                                                            | The first time a script accesses a particular **Lister** object, a snapshot is taken of the Lister state. If the script then makes changes to that Lister (e.g. it opens a new tab, or moves the window), these changes will not be reflected by the object (unless otherwise mentioned). To re-synchronize the object with the Lister, call the **Lister.Update** method.                                                                                                                                                                                                                                           |
