# electron_screenshot **Repository Path**: DreamMachine/electron_screenshot ## Basic Information - **Project Name**: electron_screenshot - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-22 - **Last Updated**: 2021-11-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 前言 IM 聊天软件需要截图功能。我们找到了一个方法,微信 dll,包装一下生成 exe 文件,我用 Node.js 去调用完成截图。 项目原理:反编译,然后再编译回来。 1. 第一步先用 Node 执行微信封装的 exe,然后会把截图复制到剪切板 2. 然后调用浏览把剪切板的内容复制出来 ``` var screen_window = execFile(__dirname + '/screen/PrintScr.exe') screen_window.on('exit', function (code) { // 执行成功返回 1,返回 0 没有截图 if (code) mainWindow.webContents.paste() }) ``` 截图软件 Git 地址: https://github.com/liangtongzhuo/electron_screenshot