Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Multi-screen support for windows #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
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",

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);
}
});
};