simulate-native-click
Simple C++/WinApi addon that allow to simulate native clicks. TypeScript definitions inside.
Install
npm install simulate-native-click --save
Usage
var simulateClick = ; let x = 100;let y = 200;simulateClicklefthwnd x y; x = 300;y = 300;simulateClickrighthwnd x y; simulateClick; // {x, y}// position relative to window simulateClick; // {x, y}// global screen position returned if no hwnd provided
You can obtain HWND using winctl
package
https://www.npmjs.com/package/winctl
var win = winctl; let hwnd = win;let x = 100;let y = 200;simulateClicklefthwnd x y;
You can also use it with electron:
let hwnd = mainWindow;let x = 100;let y = 200;simulateClicklefthwnd x y;