You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling robot.Window.setActive, none of the input calls (robot.Mouse.setPos, mouse.click, keyboard.click) would work.
If I comment out the setActive line, everything works as expected. SetActive itself works because the window was brought to the front, but any subsequent input events would silently fail.
System: Windows 10 x64, Node JS v6.3.1 using precompiled robot binary.
Here's my code:
var robot = require ("robot-js");
const data_memory_xy = robot.Point(310,493)
var list = robot.Window.getList (".*STVP.*")
if (list.length === 0) {
console.log("Please run STVP")
process.exit(0)
}
var win = list[0]
robot.Window.setActive(win)
var mouse = robot.Mouse();
robot.Mouse.setPos(data_memory_xy)
mouse.click(robot.BUTTON_LEFT);
var keyboard = robot.Keyboard();
keyboard.click("123");
The text was updated successfully, but these errors were encountered:
@kiddyfurby Sorry for the late reply. I'm actually aware that some apps refuse to work and I think it's due to a special flag that windows uses when calling SendInput. It's something that I'm continuing to research over at the main robot library.
After calling
robot.Window.setActive
, none of the input calls (robot.Mouse.setPos
,mouse.click
,keyboard.click
) would work.If I comment out the
setActive
line, everything works as expected. SetActive itself works because the window was brought to the front, but any subsequent input events would silently fail.System: Windows 10 x64, Node JS v6.3.1 using precompiled robot binary.
Here's my code:
The text was updated successfully, but these errors were encountered: