Live data from Hacker News

RobotJS – Node.js Desktop Automation

github.com

21–30 of 64 posts

Re: RobotJS – Node.js Desktop Automation

#21

Despite its many syntax quirks, AutoHotkey is an amazingly powerful tool for automating Windows keyboard and mouse input - I use it daily at work. Having an equivalent tool on the Mac would be awesome, as I don't think anything in AutoHotkey's class exists right now...

Out of curiosity, have you looked at Sikuli [1]?

[1]: http://www.sikuli.org/

Re: RobotJS – Node.js Desktop Automation

#22
post #21

Despite its many syntax quirks, AutoHotkey is an amazingly powerful tool for automating Windows keyboard and mouse input - I use it daily at work. Having an equivalent tool on the Mac would be awesome, as I don't think anything in AutoHotkey's class exists right now...

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...

Re: RobotJS – Node.js Desktop Automation

#23
post #14

//Type "Hello World". robot.typeString("Hello World"); //Press enter. robot.keyTap("enter"); Whoever designed this interface didn't think much about consistency.

It's very temporary! There's discussion about it here: https://github.com/octalmage/robotjs/issues/4

Ah, thanks for the pointer!

    keyboard.type('foo');
    keyboard.press('fn');
... makes much more sense.

Re: RobotJS – Node.js Desktop Automation

#24
post #17

Thank you OP! > 95.1% C Any intention on making this available for other languages?

I think you are misunderstanding; robotjs is written in C but it is a module for Node.js which means you implement it using Javascript. Node.js modules can be written in C or Javascript but implementing new features like this requires you to use C so there is no "making this available for other languages".

Well, you could take the API it presents and fit it to another language's FFI. Maybe someone who wants it for their language will do that.

Re: RobotJS – Node.js Desktop Automation

#26

Despite its many syntax quirks, AutoHotkey is an amazingly powerful tool for automating Windows keyboard and mouse input - I use it daily at work. Having an equivalent tool on the Mac would be awesome, as I don't think anything in AutoHotkey's class exists right now...

http://www.keyboardmaestro.com/main/ Mac Os X option.

Re: RobotJS – Node.js Desktop Automation

#27
Cool project! Seems like its capabilities are somewhat similar to Hammerspoon, an OS X project where you can script almost anything in the OS with Lua. I believe it was forked from Mjolnir.

I use it for window management (which is it awesome at, especially considering I have a very complex arrangement with a 4K monitor + laptop screen), automatic mute when not home, remapping shortcuts, and more.

The config syntax is pretty simple and works great. There are some really cool ones all over the internet. Here's mine: https://github.com/STRML/init/blob/master/hammerspoon/init.l...

Hammerspoon Docs: http://www.hammerspoon.org/docs/

Re: RobotJS – Node.js Desktop Automation

#28

Despite its many syntax quirks, AutoHotkey is an amazingly powerful tool for automating Windows keyboard and mouse input - I use it daily at work. Having an equivalent tool on the Mac would be awesome, as I don't think anything in AutoHotkey's class exists right now...

I mostly used AHK for keyboard stuff, so TextExpander would be my Mac equivalent, and within its domain it's a lot nicer and maybe even more powerful than AHK. Never done much mouse-scripting on any platform, though...

Re: RobotJS – Node.js Desktop Automation

#29
post #23

Earlier quoted context omitted.

It's very temporary! There's discussion about it here: https://github.com/octalmage/robotjs/issues/4

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)

Re: RobotJS – Node.js Desktop Automation

#30

AutoIt MVP member here (James on the forums). I'm really glad to see a replacement for AutoIt and AHK and potentially, if not already, cross-platform too. I can't speak for AHK but AutoIt has made huge progress over the last couple of years. Jon has been working on new features, especially improved COM support. Maybe RobotJS will have a community too? It'd be great to see UDF's and a thriving ecosystem.

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?
Post reply on HN