~~Title: Lister ~~
The **Lister** object represents an open [[:basic_concepts:the_lister|Lister]] window. A collection of currently open Lister objects is available from the **[[dopus|DOpus]].listers** property, and if a command results in a new Lister being opened, the **[[results|Results]]** object.
$$ Property Name
$$ Return Type
$$ Description
$$ activetab
$$ //object://**[[tab|Tab]]**
$$ Returns a **[[tab|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|Tab]]**
$$ Returns a **[[tab|Tab]]** object representing the current destination tab (in a dual-display Lister).
$$ dual
$$ //int//
$$ Indicates whether the Lister is in [[:basic_concepts:the_lister:dual_display|dual-display mode]] or not. Possible values are:
|0|single-display mode|
|1|dual-display, vertical layout|
|2|dual-display, horizontal layout|
$$ dualsize
$$ //int//
$$ Returns the current split percentage of the dual displays (e.g. **50** indicates they are evenly sized).
$$ 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 [[:basic_concepts:the_lister:layouts|Lister layout]] that this Lister came from (if any).
$$ left
$$ //int//
$$ Lister window left-edge coordinate.
$$ metapane
$$ //int//
$$ Indicates whether the [[:basic_concepts:the_lister:metadata_pane|metadata pane]] is currently open or not. Possible values are:
|0|metadata pane is not open|
|1|metadata pane is open, vertical layout|
|2|metadata pane is open, horizontal layout|
$$ right
$$ //int//
$$ Lister window right-edge coordinate.
$$ state
$$ //string//
$$ Returns the state of a single-display mode Lister:
|0|off|
|1|source|
|2|destination|
|4|locked|
$$ style
$$ //string//
$$ Returns the name of the [[:basic_concepts:the_lister:styles|Lister style]] 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.
$$ tabs
$$ //collection://**[[tab|Tab]]**
$$ Returns a collection of **[[tab|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//
$$ 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.
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.
$$ tabgroupright
$$ //string//
$$ Similar to **tabgroupleft**, above, but for the right half of the Lister (if any).
$$ tabsleft
$$ //collection://**[[tab|Tab]]**
$$ Returns a collection of **[[tab|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|Tab]]**
$$ Returns a collection of **[[tab|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://**[[..:..:command_reference:internal_commands:toolbar|Toolbar]]**
$$ Returns a collection of **[[..:..:command_reference:internal_commands:toolbar|Toolbar]]** objects representing all currently open toolbars in this Lister.
The collection is obtained directly each time the script asks for it, and is not a snapshot, so you don't need to call **Update** for it to reflect changes.
$$ top
$$ //int//
$$ Lister window top-edge coordinate;
$$ tree
$$ //int//
$$ Indicates whether or not the [[:basic_concepts:the_lister:navigation:folder_tree|folder tree]] is currently open. Possible values are:
|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
$$ //string//
$$ If the [[:basic_concepts:the_lister:utility_panel|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**.
$$ utilpane
$$ //int//
$$ Indicates whether or not the [[:basic_concepts:the_lister:utility_panel|utility panel]] is currently open. Possible values are:
|0|utility panel is not open|
|1|utility panel is open|
$$ vars
$$ //object://**[[vars|Vars]]**
$$ This **[[vars|Vars]]** object represents all defined variables with //Lister scope// (that are scoped to this Lister).
$$ viewpane
$$ //int//
$$ Indicates whether or not the [[:basic_concepts:the_lister:viewer_pane|viewer pane]] is currently open. Possible values are:
|0|viewer pane is not open|
|1|viewer pane is open, vertical layout|
|2|viewer pane is open, horizontal layout|
$$ viewpanefile
$$ //object://**[[path|Path]]**
$$ 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.
The path is obtained directly each time the script asks for it, and is not a snapshot, so you don't need to call **Update** for it to reflect changes.
$$ 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|Dialog]]**
$$ Creates a new **[[dialog|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
$$
$$ //bool//
$$ Moves the Lister window to the specified virtual desktop. Returns **True** if successful.
$$ SetTaskbarGroup
$$
$$ //bool//
$$ 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.
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 **True** on success.
$$ 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.