Questions tagged [robotjs]

RobotJS is a desktop automation library

RobotJS is a desktop automation library with support for Mac, Windows and Linux.

40 questions
1
vote
1 answer

Cannot compile robotjs for electron on my mips platform Linux

I am trying to use robotjs in my electron on a mips based Ubuntu. Since electron has mips linux version only up to version 1.8.8 (after that, no support), so I download this 1.8.8 electron-mips version. Then, I need to install Node, by checking the…
guozh
  • 21
  • 2
1
vote
1 answer

Simulating global keyboard shortcuts to test an Electron app in travis-ci and appveyor

I am trying to do an end-to-end test of my Electron app using Spectron. I need these tests to work on travis-ci (linux and mac) and appveyor (windows). I need to simulate the global shortcut Ctrl + X (⌘ + X on Mac). Spectron does not provide the…
1
vote
1 answer

Angular, electron, typescript and robotjs

I'm trying to use Typescript together with Electron and RobotJS. I'm a beginner with all of these technologies so I lack the deep understanding of what is happening behind the scenes so I cannot really connect the dots on this issue. Electron and my…
Sorin Grecu
  • 1,036
  • 11
  • 30
1
vote
2 answers

robot-js + opencv screenshot appears in grayscale

Right now I'm trying to use screenshot made with node module robot-js in opencv. But for some reason it appears in grayscale. This is my code: My code: 'use strict'; const opencv = require('opencv'), robot = require('robot-js'), …
255h
  • 11
  • 3
0
votes
0 answers

Mouse Clicks on a Cloud VM?

I have a NodeJS application that uses Selenium and RobotJS to do some browser automation. Specifically, RobotJS is used to perfom clicks on the browser (Chrome) context menu. Running this application on my computer would interfere with my usage of…
0
votes
0 answers

Base64 string isn't sending over socket.io

I am making a reactjs app in electron and nodejs and as part of that am converting robotjs screenshots into base64 strings. However, when I try to print the var b64, it says data:image/png;base64,undefined. Here is the code for it: const img =…
Andy K
  • 3
  • 3
0
votes
0 answers

How to pack a Node JS project to .exe file while using packages such as opencv4nodejs and robotjs

I wrote a demo to create screenshot by robotjs, find the location of a target button by opencv4nodejs and click it. As description above, robotjs, opencv4nodejs and node-ffi was used in this script. I also want to pack it as .exe file so we can…
0
votes
1 answer

Instantly type in keyboard using JavaScript

I'm currently developing a RPA application. I need to type a text in keyboard, but I need this process to be executed instantly (as if it were a copy and paste). I've tried Nut.js and Robotjs but both of these have a delay between one key and…
Eliel
  • 13
  • 3
0
votes
1 answer

Compiled against a different Node.js version using NODE_MODULE_VERSION

Nodejs version: v12.22.11 Electron version: ^11.1.0 RobotJS version: ^0.6.0 The following error message will be prompted when executing the project. App threw an error during load Error: The module…
Yang
  • 63
  • 8
0
votes
0 answers

How to automate typing with the help of a chrome extension?

I want to build a chrome extension that automatically types into a focused text box (i.e. where the cursor is placed) on a web page. It should use the keyboard automatically and should not try changing the HTML of the web page using dom. I tried…
0
votes
1 answer

So many errors when trying to install RobotJS through "npm install robotjs". Any idea whether I'm missing some dependency or something else?

When I run npm install robotjs I get a huge error message (pasted at the bottom). So far, I've tried: purging and reinstalling node apt-get purge nodejs rm -r /etc/apt/sources.list.d/nodesource.list curl -fsSL…
0
votes
1 answer

Keyboard macro press X each few secons while i press other keys

I'm playing a game that i need to press X each 1 sec, while i press other keyboard keys, but my hands are responding to pain first i tried to do it on javascript: const robot = require("robotjs"); function Sleep(ms) { return new Promise((resolve)…
hiwyn
  • 1
0
votes
0 answers

Using pkg to create .exe failing because of robotjs

So I am using pkg to create an executable of a fairly simple node/express application. I am having issues with the npm module robotjs, whenever I create my exe, it wont run because of the following error: pkg/prelude/bootstrap.js:1740 throw…
earlycoder
  • 25
  • 1
  • 5
0
votes
1 answer

How would I get an unaltered RobotJS screenshot and save it to a file?

I have a program that takes a robotjs screen capture and saves it to a file, like a 1 fps live stream. const Jimp=require("jimp"); const robot=require("robotjs"); const fs=require("fs"); setInterval(function(){ var img=robot.screen.capture(); …
Lakshya Raj
  • 1,669
  • 3
  • 10
  • 34
0
votes
2 answers

In JavaScript, I'm randomly selecting a function, however when that function is selected, the code inside it is not run

I am trying to randomly select a function from an array of different functions. In the console it says "[Function: cycle3]" so it IS telling me which function is being chosen, however the code inside the function is not ran. How can I get the code…
user15048458