Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robotjs in Electron docs #681

Open
AndreiSoroka opened this issue Jul 19, 2021 · 1 comment
Open

Robotjs in Electron docs #681

AndreiSoroka opened this issue Jul 19, 2021 · 1 comment

Comments

@AndreiSoroka
Copy link

AndreiSoroka commented Jul 19, 2021

Expected Behavior

When I run node script:

const robot = require('robotjs');

setTimeout(() => {
  const mouse = robot.getMousePos();

  // Get pixel color in hex format.
  const hex = robot.getPixelColor(mouse.x, mouse.y);
  console.log(`#${hex} at x:${mouse.x} y:${mouse.y}`);
}, 1000);

I get modal message (dialog, popup):

image

But when I try to do it in [email protected]. Just nothing. No errors. No modals to ask access permission. Just not work.

Possible Solution

I think need to add to documentation: "how setup electron".

For example here: http://robotjs.io/docs/electron

Context

I would like add paste event to my electron app in other apps;

 robot.keyTap('v', process.platform==='darwin' ? 'command' : 'control')

Your Environment

  • RobotJS version: 0.6.0
  • Node.js version: (in electron): 12.14.1,
  • Electron version: 9.4.4
  • Operating System: MacOs Big Sur 11.2.3
@AndreiSoroka
Copy link
Author

AndreiSoroka commented Jul 19, 2021

    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
    <key>com.apple.security.cs.disable-executable-page-protection</key>
    <true/>

not helped

from https://stackoverflow.com/questions/63307240/signed-electron-app-does-not-start-with-robotjs-on-osx-unhandled-errpr-no-suit and from #515 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant