Open Vahelnir opened 8 years ago
Hi @Vavaballz, which version of RobotJS are you using? And which game?
The last one, 0.4.4. I tried with CS:GO and with Warframe.
TF2 here, same issue.
Minecraft here, same issue
OS: Mac 10.11.6 Game: Minecraft
I also tried using the "move-mouse-drag" branch, but to no avail... 😠(I downloaded the 0.4.4 branch, then manually edited the files so that they were in sync with the 0.3.7 "move-mouse-drag" branch)
This seems to be an issue for both Mac and Windows? Does the issue happen if the game isn't fullscreen?
Yes, my first try with with warframe, warframe was fullscreen windowed
OS: Windows 7 Game: Lego StarWars Complete Saga RobotJS version 4.40
Similar problem, keys get stuck once pressed, until I tab out of the game and back in. Except for the arrow keys which are released properly.
PS: Using DxWnd to force the game into windowed mode does not help.
This might in fact be fixed when #218 is fixed/executed. I edited my application to use autoit (https://github.com/xhawk18/node-autoit) instead of robotjs and that makes it work flawlessly with Lego StarWars. That means it only works on windows for now.
Those who are testing under Windows should try using the autoit module and report their results....
Nope, running windows, even tried autoit, trying to run VisualBoyAdvance (Gameboy Emulator) Only first input registers.
I will try to look into it this weekend, Windows isn't my first OS, so it's more difficult to look into this kind of stuff.
@jdtzmn I spent some time testing this, and I wasn't able to replicate:
I haven't tested on Windows yet. Was this similar to what you were trying? Here's the code I used:
var robot = require('robotjs');
setInterval(function() {
robot.mouseClick();
console.log('Clicked.');
}, 2000);
Oh... thought this was about moving the mouse, not clicking... 😜
So here another problem that I've encountered too on windows 10, it could be slightly different but still can be originated from the same malfunctioning code. It's not only games, to test this I pressed f11 on chrome and I can't write anymore, but it seems that only letters keys don't work anymore, in fact if I press f11 again chrome get out from fullscreen mode and everything return to work normally.
UPDATE: I noticed one thing (this may be a problem that occurs only to me). I am a js developer and when I work on the console (and start a js script with node to say) it happens sometime that I have to wakeup powershell (same thing happen with the cmd) with some sort of input (it can be the right click of the mouse or the return key) and then it starts the execution that had to start before... it's like it goes in stand-by. I said this because this is exactly what happens when I play on full-screen, I come back on powershell and I've to wake it up with some input.
Is there a solution yet?
Any update on this issue?
Happening to me, mouse doesn't work at all in CS:GO.
Yeah here too, whats the cause for it? Want to use it to run automated tests on game builds ...
Does anyone know any alternatives that work?
Same, trying on GlobalMu atm and doesn't register left or right clicking
Same problem with Elite:Dangerous. First keyTap works and then nothing else work. I tried with vJoy to send joystick button press instead of keyTap with RobotJS : same issue
I want to use a virtual keyboard on a tablet, but I guess it is some kind of anti-cheat mechanism (like gameguard or xigncode) that prevents inputs from suspicious programs.
Does it appear only on Online Games ? I would be a hint...
I've the same issue. It won't click again after the first click.
Here is my code:
const robot =require('robotjs'); let timeout; window.addEventListener('mousemove',()=>{ clearInterval(timeout); timeout = setTimeout(()=>{ robot.mouseClick('left',false); console.log('clicked ') }, 1000); })
@upkanet @nitti87 can you please provide a reproducible code? I can't reproduce it
I'm having a similar issue with Elite: Dangerous. keyTap() works as expected with the Home key (I can spam it and the game responds as if I were doing so on the actual keyboard), but other keys respond only once until I click out of the game and back in.
any update on this?
Having a similar issue. When working with windowed fullscreen games which keep the mouse in middle, the mouse position is very weird
Hey guys, I was having this problem too on Win10. After spending some time on it, it seems to be a permissions error. So just run your program as admin. If you're running your program from a terminal, make sure you're running that terminal as admin.
I just encountered this same issue and this seems to be the only thread on the internet that I can find where the issue has been brought up. Is there a fix for this yet, or do we know what the actual issue is? (I have tried running as administrator with no luck)
Hey guys, I was having this problem too on Win10. After spending some time on it, it seems to be a permissions error. So just run your program as admin. If you're running your program from a terminal, make sure you're running that terminal as admin.
This works for me. thank you
I launch my IDE (VSCode) with administrator just solved the problem.
Hello everyone, First, i'm sorry if there is any mistake. Second, i'm also sorry if this was already asked but i didn't find it. Actually, i don't really know if the issue is due to RobotJS, NodeJS or Windows but when i try to do for example 2 mouseClick() on a game window when it is focused, only the first click works.
EDIT: I'm a working with a vanilla nodejs script in cmd Thank you for the help.