分享
nw.js解決截圖問題护糖,代碼
var screen_window = execFile( global.process.cwd()+'/jietu/PrintScr.exe')
//global.process.cwd()獲取當(dāng)前目錄的絕對(duì)路徑
screen_window.on('exit', function (code) {
console.log(code)
// 執(zhí)行成功返回 1,返回 0 沒有截圖
if (code) mainWindow.webContents.paste()
})
electron類似