Skip to content

Tego Bot API Documentation v0.1.1


Tego Bot API Documentation / getAllWindows

Function: getAllWindows()

getAllWindows(): WindowInfo[]

Defined in: index.ts:674

Get a list of all visible windows

Note: Currently returns only the active window due to API limitations of the underlying library. Future versions may support enumerating all windows.

Returns

WindowInfo[]

Array of WindowInfo objects

Example

typescript
import { getAllWindows } from "@tego/botjs";

const windows = getAllWindows();
console.log(`Found ${windows.length} windows`);
windows.forEach(win => {
  console.log(`- ${win.title}`);
});

Released under the MIT License.