Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ build/Release
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules


.DS_Store
Binary file modified capture/bin/nircmd.exe
Binary file not shown.
31 changes: 16 additions & 15 deletions capture/win32.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
module.exports = function(options, callback) {
var fs = require("fs");
var childProcess = require("child_process");
var path = require("path");

var fs = require('fs');
var childProcess = require('child_process');
var path = require('path');

var nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshot", options.output]);
var nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), [
"savescreenshotfull",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be a better idea to use an option for the full screen. This most probably would break previous implementations.

options.output
]);

nircmd.on('close', function(code, signal) {
try {
fs.statSync(options.output);
callback(null, options); // callback with options, in case options added
}
catch(error) {
callback("file_not_found", null);
}
});
};
nircmd.on("close", function(code, signal) {
try {
fs.statSync(options.output);
callback(null, options); // callback with options, in case options added
} catch (error) {
callback("file_not_found", null);
}
});
};
Loading