wrapper around screencapture
.
import screencapture from 'macos-screencapture'
const configuration = {
path: `/path/to/file.png`,
options: [ screencapture.options.noSound ]
}
screencapture(configuration)
.then(path => console.log(`file location: ${path}`))
.catch(err => console.log(`error: ${err}`))
{
path: path.join(os.tmpdir(), filename),
// filename = screencapture-${unixtimestamp}-${2randomBytes}.${extension}
options: [ options.noSound, options.format.default ]
}
array of options i.e. ['-x']
.
capture goes to clipboard
include cursor in capture (non-interactive mode)
capture interactively
only capture the main monitor
open a new mail message with the capture
when capturing in window mode, do not include the shadow of the window in the capture
open the capture in Preview
only allow mouse selection mode
when capturing in window mode, capture whatever is within the window view
choose image format
format() // [`-t`, `png`]
format(`imageFormat`) // [`-t`, `imageFormat`]
format.default // [`-t`, `png`]
format.pdf
format.jpg
format.tiff
delay capture by # of seconds
delay() // [`-T`, 5]
delay(10) // [`-T`, 10]
delay.default // [`-T`, 5]
only allow window selection mode
windows mode pre-selected in interaction mode
no capture sound
attached windows are not captures
exclude dpi data from caputured file