Skip to content

Tego Bot API Documentation v0.1.1


Tego Bot API Documentation / findWindowsByProcess

Function: findWindowsByProcess()

findWindowsByProcess(processName): WindowInfo[]

Defined in: index.ts:723

Find windows by process name using case-insensitive partial matching

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

Parameters

processName

string

Process name to search for (case-insensitive partial match)

Returns

WindowInfo[]

Array of matching WindowInfo objects

Example

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

// Find VS Code windows by process
const vscodeWindows = findWindowsByProcess('code');
vscodeWindows.forEach(win => {
  console.log(`${win.title} - ${win.processPath}`);
});

Released under the MIT License.