From 250297e54b93517755f2fc2470c4594419aa4c49 Mon Sep 17 00:00:00 2001 From: Sanil Singh Tomar <10262489+lon3wolf@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:01:58 -0700 Subject: [PATCH 1/2] All screen support --- capture/win32.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/capture/win32.js b/capture/win32.js index 99a866f..41d70f8 100755 --- a/capture/win32.js +++ b/capture/win32.js @@ -3,9 +3,11 @@ module.exports = function(options, callback) { 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]); - + if (options.allScreen) { + nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshotfull", options.output]); + } + nircmd.on('close', function(code, signal) { try { fs.statSync(options.output); @@ -15,4 +17,4 @@ module.exports = function(options, callback) { callback("file_not_found", null); } }); -}; \ No newline at end of file +}; From 4177291d1a59d4e2978c9b0ad0a18d0cadafb9ab Mon Sep 17 00:00:00 2001 From: Sanil Singh Tomar <10262489+lon3wolf@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:13:06 -0700 Subject: [PATCH 2/2] Update win32.js --- capture/win32.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/capture/win32.js b/capture/win32.js index 41d70f8..11da5e2 100755 --- a/capture/win32.js +++ b/capture/win32.js @@ -3,10 +3,13 @@ module.exports = function(options, callback) { 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]); - if (options.allScreen) { + var nircmd = null; + if (options.allScreens == true) { nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshotfull", options.output]); } + else { + nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshot", options.output]); + } nircmd.on('close', function(code, signal) { try {