I can't make robot.js to work in nwjs.
Now I get this error:
Uncaught Error: A dynamic link library (DLL) initialization routine failed. \\?\C:\PP\gene6al_test\v25\server\node_modules\robotjs\build\Release\robotjs.node
Can somebody point me to the direction how to fix this?
I have tried multiple nwjs versions
and also tried node-gyp configure --target=v6.2.2 and node-gyp build --target=v6.2.2 for nwjs v0.15.4 64bit windows
and nw-gyp.
Here is code I wold like to make work:
var robot = require("robotjs");
var x=13;
var y=37;
setInterval(getx_y, 333);
function getx_y( )
{
var mouse = robot.getMousePos();
x=mouse.x;
y=mouse.y;
//console.log("Mouse is at x:" + x + " y:" + y);
//you can reset counter here
if (x===0 && y===0){
var win = gui.Window.get();
win.focus();
}
}
via genesix.eu
No comments:
Post a Comment