Live data from Hacker News

RobotJS – Node.js Desktop Automation

github.com

31–40 of 64 posts

Re: RobotJS – Node.js Desktop Automation

#35
post #30

Earlier quoted context omitted.

Awesome! AutoIt is great. AutoHotkey wouldn't exist if it wasn't for AutoIt. AutoHotkey has also improved a bunch recently. Lexikos picked up development and he's done a killer job. But unfortunately it (and AutoIt) will never be cross platform. That's why I made RobotJS. I honestly never thought about a community but that's an amazing idea. A classic forum would be great, I've spent so much time on the AutoHotkey/Au…

Why won't it ever be cross-platform? Would the effort just be too gargantuan?

It's too directly tied to the Windows API. The vast majority of non-language code would have to be rewritten to run correctly, unless they emulate the Windows API instead.

Re: RobotJS – Node.js Desktop Automation

#36
post #29
post #23

Earlier quoted context omitted.

Ah, thanks for the pointer! keyboard.type('foo'); keyboard.press('fn'); ... makes much more sense.

I'd go for as short (but still readable) as possible. > robot.keys("Type a string") > robot.keys(ENTER) // ENTER is an integer key value (I've been thinking about this while trying to make an idiomatic node client for Selenium WebDriver... https://github.com/hugs/34#api )

Importing enum values into global/function/module local namespace has always been a PITA for javascript environments. Any suggestion on how to do this cleanly?

Re: RobotJS – Node.js Desktop Automation

#37

is there anything like this for browsers? I know theres things like casperjs but that seems more "browser test" specific, not "browser automation"

Selenium can be used for browser automation.

Yup, Selenium has been around since 2004, and is now the basis of the W3C standard [1] for browser automation. Most browser vendors now officially support the spec. (Disclosure: I started the Selenium project. AMA.)

[1]: https://w3c.github.io/webdriver/webdriver-spec.html

Re: RobotJS – Node.js Desktop Automation

#38
post #21

Earlier quoted context omitted.

Out of curiosity, have you looked at Sikuli [1]? [1]: http://www.sikuli.org/

I hadn't heard of it before, and it does look potentially very powerful. My only initial concern from reading the quick start ( http://www.sikulix.com/quickstart.html ) is the apparent requirements to use the "SikuliX IDE" for scripting...

The magic of Sikuli is its use of the OpenCV library under the hood (and Tesseract for OCR). You could skip the Sikuli part and just use OpenCV and Tesseract directly. (Not easy, but theoretically possible.)

Re: RobotJS – Node.js Desktop Automation

#39
post #29

Earlier quoted context omitted.

I'd go for as short (but still readable) as possible. > robot.keys("Type a string") > robot.keys(ENTER) // ENTER is an integer key value (I've been thinking about this while trying to make an idiomatic node client for Selenium WebDriver... https://github.com/hugs/34#api )

Importing enum values into global/function/module local namespace has always been a PITA for javascript environments. Any suggestion on how to do this cleanly?

I'm sure it's possible, but one way to avoid it -- turn the constant into a method:

  > robot.keys.ENTER()
(Not great for key combos, though...)

Re: RobotJS – Node.js Desktop Automation

#40
post #39

Earlier quoted context omitted.

Importing enum values into global/function/module local namespace has always been a PITA for javascript environments. Any suggestion on how to do this cleanly?

I'm sure it's possible, but one way to avoid it -- turn the constant into a method: > robot.keys.ENTER() (Not great for key combos, though...)

[deleted]
Post reply on HN