rubick-native
rubick-native copied to clipboard
[Nodejs][cross-platform] 鼠标键盘模拟输入&事件监听、光标位置获取、获取剪贴板文件或文本、获取已安装应用列表和图标、获取活跃&聚焦窗口信息、获取文件管理器实时路径 | Mouse and keyboard simulation input &...
单独的在 nodejs 中使用没有问题。 安装 electron main.js 填写简单的示例代码。一开始捕获好像都很正常。焦点放到了新建的窗口上。按一个按钮程序就会闪退 ``` const {app, BrowserWindow} = require('electron'); const {onInputEvent} = require('rubick-native') const createWindow = () => { const win = new BrowserWindow({ width: 800,...
稳定 API 后,用 Rust 实现以提高文件游走的速度
安装了后获取鼠标位置 ``` import { mouseLocaion } from 'rubick-native'; setInterval(() => { console.log(mouseLocaion()); }, 3000); ``` 然后运行electron:serve,出现错误 ``` Bundling main process... ERROR Failed to compile with 1 error 6:56:55 PM error...