-
-
Notifications
You must be signed in to change notification settings - Fork 150
Instant drag mouse #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @ricardopolo 👋 no, at the moment this is not possible with nut.js |
Hi @ricardopolo 👋 I just had a look at your mentioned example and tested it on macOS, where it actually does not work. Otherwise I'll close this issue soonish. |
It works in my case in windows. Basically I created a Remote Desktop like solution and move the remote computer using RobotJs. Would love to do it with Nut.js. The instant drag is useful, as example, when dragging a file in windows explorer |
This issue is stale because it has been open for 30 days with no activity. |
I’ll have a look on Windows specifically |
@ricardopolo I just did a double check on Windows, it works just fine.
See the following snippet: const {mouse, Button, sleep} = require("@nut-tree/nut-js");
(async () => {
await sleep(3000);
const current = await mouse.getPosition();
await mouse.pressButton(Button.LEFT);
await mouse.setPosition({x: current.x + 500, y: current.y});
await mouse.releaseButton(Button.LEFT);
})(); |
Any way to instant drag the mouse?
Like
setPosition
but whit button held?In robotjs: http://robotjs.io/docs/syntax#dragmousex-y
The text was updated successfully, but these errors were encountered: