Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Application

Application interface

Interface to open and close applications

param

Application name, might be a single execute or a whole path. Note: if the application path and / or name has whitespaces in it one needs to escape them properly. See example below.

example

Creating an Application instance

const calc = new Application("gnome-calculator");

Pass arguments to application

const example = new Application("/path/to/my/application --param1 --param2 param3");

Pass arguments to application containing whitespaces

const example = new Application("/path\\ with\\ whitespaces/application\\ name --param1 --param2 param3");

Hierarchy

  • Application

Index

Methods

close

  • close(optSilent?: undefined | false | true): Promise<Application>

focus

focusWindow

  • focusWindow(windowNumber: number): Promise<Application>

getName

  • getName(): string

getRegion

  • getRegion(): Promise<Region>

getRegionForWindow

  • getRegionForWindow(windowNumber: number): Promise<Region>

kill

  • kill(optSilent?: undefined | false | true): Promise<Application>

open

setSleepTime