Takes a screenshot of selected area and saves it to disk.
$ npm install screenshot-node
call the module
var screenshot = require('screenshot-node');
The x and y coordinates for the top left corner of the picture.
The width and height of the screenshot in pixels.
The path including name of the file you want the screenshot to be saved as.
A string with error message. Null if there are no error.
Takes a screenshot from top left corner that have a width and height of 100. Saves it in the current directory with the name "image.png".
screenshot.saveScreenshot(0, 0, 100, 100, "image.png", (err) => {
if(err) console.log(err);
}