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...
RobotJS – Node.js Desktop Automation
41–50 of 64 posts
Re: RobotJS – Node.js Desktop Automation
#42See also: http://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html Java had this, like, forever. Long live "Write Once Run Anywhere"!
Re: RobotJS – Node.js Desktop Automation
#43Earlier 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...)
robot.keys.enter()
(since enter is a function, not a constant) and make it chainable by returning `robot.keys`. robot.keys.ctrl().enter()Re: RobotJS – Node.js Desktop Automation
#44Earlier quoted context omitted.
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
#45Despite 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...
Re: RobotJS – Node.js Desktop Automation
#46is 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.
Re: RobotJS – Node.js Desktop Automation
#47Earlier quoted context omitted.
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".
I stand corrected. I looked closer. I never knew node modules could be written in C.
I would only implement the low level "hardware" primitives in C, then implement the high level API in JS like Chromium's Blink-in-JS initiative [2]. Once they start expanding the high level functionality, they will lose potential contributors by sticking with pure C.
[1] https://github.com/octalmage/robotjs/blob/master/src/robotjs...
Re: RobotJS – Node.js Desktop Automation
#48Earlier quoted context omitted.
Selenium can be used for browser automation.
I've used Selenium a bunch the last couple months to automate daily/hourly jobs to pull data from 3rd party UIs that don't offer an API. I couldn't imagine not having a tool like Selenium at my disposal!
example here: https://github.com/SchizoDuckie/DuckieTV/blob/angular/js/uti...
Re: RobotJS – Node.js Desktop Automation
#49Re: RobotJS – Node.js Desktop Automation
#50I wrote up some ideas about "aQuery -- Like jQuery for Accessibility", which RobotJS would be very useful for implementing. It refers to the Mac accessibility API but it could work with any platform, and even abstract the differences between platforms just like jQuery does.
http://www.donhopkins.com/mediawiki/index.php/AQuery
Also, Morgan Dixon did some wonderful stuff with Prefab: The Pixel-Based Reverse Engineering Toolkit, which would be great to integrate into RobotJS.
http://homes.cs.washington.edu/~mdixon/research/prefab/
aQuery -- like jQuery, but for selecting, querying and manipulating Mac app user interfaces via the Accessibility framework and protocols.
So you can write jQuery-like selectors that search for and select Accessibility objects, and then it provides a convenient high level API for doing all kinds of stuff with them. So you can write higher level plugin widgets with aQuery that use HTML with jQuery, or even other types of user interfaces like voice recognition/synthesis, video tracking, augmented reality, web services, etc!
For example, I want to click on a window and it will dynamically configure jQuery Pie Menus with the commands in the menu of a live Mac app. Or make a hypercard-like user interface builder that lets people drag buttons or commands out of Mac apps into their own stacks, and make special purpose simplified guis for controlling and integrating Mac apps.
[...]
aQuery could apply the DOM tree searching and traversal and data association stuff to the Accesibility Tree, which is similar in a lot of ways to a DOM tree, and describes all the widgets and user accessible affordances and commands in an app, as well as non-tree-like relationships between them (this label describes that widget, this tab represents that panel, this icon represents that view, this editor manipulates that object, etc).
[...]
aQuery should provide ways of registering patterns and calling handlers when user interface items that match them are created and destroyed. jQuery doesn't directly provide a way to do that (handling page onload events and XHR request responses is usually sufficient), but of course there is a jQuery plug-in that does it: https://code.google.com/p/mutation-summary/ .
So when some user interface objects you're interested in controlling come into existence, you can wrap them with your own "widget" to glue them into whatever other user interface you want to provide. (pie menus, hyperlook, ar, speech recognition, etc).
[...]
I think aQuery should be independent of jQuery, but I like to use jQuery as a metaphor for how it works, even though that might suggest that it's tied to jQuery, or even HTML, which it shouldn't be.