octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.26k stars 937 forks source link

scrollMouse doesn't work #674

Closed sunshine173 closed 3 years ago

sunshine173 commented 3 years ago

Context

var robot = require("robotjs"); robot.setMouseDelay(30); for (let i = 0; i < 100; i++) { let x = Math.floor(Math.random()1000); let y = Math.floor(Math.random()1000); x = Math.random()<0.5?-x:x; y = Math.random()<0.5?-y:y; robot.scrollMouse(x, y); }

Your Environment

sunshine173 commented 3 years ago

I fixed with robotgo's code https://github.com/go-vgo/robotgo/blob/master/mouse/mouse_c.h