3

I've already tried RobotJS (which gives me an error on Windows, while installing package, probably because the library is old).

I want to be able to move the cursor and also to click at that point.

Please note that sometimes I just want to move it, without clicking it.

Thank you

  • Not sure that you can *fake* a user interaction... – sjahan Mar 14 '19 at 15:55
  • 1
    Possible duplicate of [Move Mouse Cursor Javascript](https://stackoverflow.com/questions/4804068/move-mouse-cursor-javascript) – Serge K. Mar 14 '19 at 15:57
  • Are you doing this for automated testing your app? if so, you might want to try selenium, see this thread: https://sqa.stackexchange.com/a/9010 – solarc Mar 14 '19 at 15:59
  • 1
    This is related to Electron. – Stefanica Stefan Mar 14 '19 at 16:00
  • I want to move the mouse in real time based on some coordinates received from another app, but I'm stuck at the actual mouse moving. In C# you can do it like ```Cursor.position = new Point(0, 0);``` I want to know if it's something like this in Electron too. – Stefanica Stefan Mar 14 '19 at 16:02
  • 1
    @StefanicaStefan Electron is basically a web-browser embedded in a native application. By checking quickly its documentation, there is no API about moving the cursor, and a web-browser won't allow you to do that, so I guess you won't have any way to do this. Except by faking it, as in the suggested duplicate above. – sjahan Mar 14 '19 at 16:07

0 Answers0