0.2.0 • Published 2 years ago

capture-window v0.2.0

Weekly downloads
8
License
MIT
Repository
github
Last release
2 years ago

capture-window

Capture a desktop window to a png file. Simple and easy.

Installation

npm install --save capture-window

Usage

const captureWindow = require('capture-window')

captureWindow('Finder', 'Downloads').then((filePath) => {
  // filePath is the path to a png file
})

API

captureWindow(bundle, title[, filePath])

  • bundle (string, required)
  • title (string, required)
  • filePath (string | null, optional)
  • returns Promise<string> - path to a png file

Captures the window with the title title of type bundle. bundle is usually the name of the application, e.g. Finder, Safari, Terminal.

OS Support

Only Mac OS X at the time being. The source is well prepared for other systems, pull requests welcome.

License

MIT

0.2.0

2 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago