I\'m in a research to find a way to take a screenshot of a window using Node.js, and I\'m trying to do this with node-ffi, but I don\'t know how... at a time I\'m stuck here:
You could use a NPM package called "desktop-screenshot". It's very simple to use.
Example on NPM:
var screenshot = require('desktop-screenshot');
screenshot("screenshot.png", function(error, complete) {
if(error)
console.log("Screenshot failed", error);
else
console.log("Screenshot succeeded");
});
https://www.npmjs.com/package/desktop-screenshot